Google AdWords Integration

Options

We are working on integrating Google AdWords with our site. Placing the code in the PageWrapper was easy, and we have been able to track conversions successfully. However, we do not know how to pull the donation amount off of the confirmation/completed pages. Has anyone had success with this?

I placed a copy of our code below with quotes around the entire object. I've also placed pound signs (#) in place of our actual Google AdWords number. We used "1.0" in the google_conversion_value field since we don't know how to reference the donation/payment amount. Does anyone know what we could input for the field reference to pull actual dollar amounts? Thanks!

''<!-- Google Code for Convio Conversions Conversion Page -->

<!--<br />

var google_conversion_id = ##########;<br />

var google_conversion_language = "en_US";<br />

var google_conversion_format = "1";<br />

var google_conversion_color = "ffffff";<br />

var google_conversion_label = "YJMDCOCOZBDavp35Aw";<br />

if (1.0) {<br />

var google_conversion_value = 1.0;<br />

}<br />

//-->

<br /><img height="1" width="1" border="0" src="https://www.googleadservices.com/pagead/conversion/XXXXXXXXXX/?value=1.0&label=YJMDCOCOZBDavp35Aw&script=0"/><br />"

Linton Myers

Alzheimer's Association

linton.myers@alz.org

Tagged:

Comments

  • Some Convio tags are the trick here:

    google_conversion_value = ]" 1 "]" length substring]]]];

    What this does is, it takes the S120 tag for the donation amount (note, this is for donations only, if you want this for e-commerce, you'll need a different S120), then uses a substring to pop the dollar sign off -- Google chokes on that.

    The value needs to be an number, so don't put quotes around it. I usually surround all Google and other vendor script code with a try-catch block just in case something goes south.

    I have all the Google AdWords, Conversion Services and Analytics code blocks tucked into a single Reuseable page that's included in my page wrappers, makes management way easier.

  • Michael :

    Some Convio tags are the trick here:

    google_conversion_value = ]" 1 "]" length substring]]]];

    What this does is, it takes the S120 tag for the donation amount (note, this is for donations only, if you want this for e-commerce, you'll need a different S120), then uses a substring to pop the dollar sign off -- Google chokes on that.

    The value needs to be an number, so don't put quotes around it. I usually surround all Google and other vendor script code with a try-catch block just in case something goes south.

    I have all the Google AdWords, Conversion Services and Analytics code blocks tucked into a single Reuseable page that's included in my page wrappers, makes management way easier.

    Michael:

    Thank you, thank you, thank you. I ended up needing to strip out the "length substring" section to make it work on our site. But, you solved one of the biggest problems that I have been running into. Thanks!

    Linton

  • Michael :

    Some Convio tags are the trick here:

    google_conversion_value = ]" 1 "]" length substring]]]];

    What this does is, it takes the S120 tag for the donation amount (note, this is for donations only, if you want this for e-commerce, you'll need a different S120), then uses a substring to pop the dollar sign off -- Google chokes on that.

    The value needs to be an number, so don't put quotes around it. I usually surround all Google and other vendor script code with a try-catch block just in case something goes south.

    I have all the Google AdWords, Conversion Services and Analytics code blocks tucked into a single Reuseable page that's included in my page wrappers, makes management way easier.

    Note that the E130 tag should not be in T8 tags -- T8 simply escapes double quotes, so really, you should just need the following:

    ]" 1 "]" length substring]]

    One thing I'd say is that in this scenario the E130 tag is likely unnecessary, since the tag is being processed by Javascript anyway you might as well just use the replace() method to remove the $ sign:



    var str="]";

    str=str.replace("$","");

  • Noah Cooper:

    Note that the E130 tag should not be in T8 tags -- T8 simply escapes double quotes, so really, you should just need the following:

    ]" 1 "]" length substring]]

    One thing I'd say is that in this scenario the E130 tag is likely unnecessary, since the tag is being processed by Javascript anyway you might as well just use the replace() method to remove the $ sign:



    var str="]";

    str=str.replace("$","");

    @Noah -- happened to be looking around for documentation on the substring function and noticed your reply here.  The reason I wouldn't recommend using JS to parse out the dollar sign is because, simply, not evey donor will have JS enabled so having Convio do the work instead server-side is safer and therefore more accurate -- which is very important when you're talking about paid adversting ROI analysis as opposed to just traffic reporting....

  • Michael :

    @Noah -- happened to be looking around for documentation on the substring function and noticed your reply here.  The reason I wouldn't recommend using JS to parse out the dollar sign is because, simply, not evey donor will have JS enabled so having Convio do the work instead server-side is safer and therefore more accurate -- which is very important when you're talking about paid adversting ROI analysis as opposed to just traffic reporting....

    I'd agree that generally it's better to do such things server-side, but in this specific example, it is entirely dependent on JavaScript anyway.

Categories