Adcenter / Adwords Conversion tracking
Adcenter / Adwords Conversion tracking
Does anyone have a good Conlib created for tracking Revenue for Adcenter and Adwords? My Google Analytics works perfectly but AdCenter & AdWords do not register the Order Total or Order Number for each order. I see what Mahzer did in this post a couple years ago... viewtopic.php?f=42&t=12481 But I do not understand enough to re-write for AdCenter and AdWords, I'm sure someone else has. Can anyone help with this?
Re: Adcenter / Adwords Conversion tracking
Hello Joe,
Did you ever get your tracking working for adcenter and adwords? I am have a bit of a hard time with that myself?
thanks
Did you ever get your tracking working for adcenter and adwords? I am have a bit of a hard time with that myself?
thanks
Re: Adcenter / Adwords Conversion tracking
No, sadly I have not. It's cool though, who really needs to figure out ROI's anyway. Please post up some code examples if you get it going.
- crockettdunn
- Lieutenant Commander (LCDR)
- Posts: 105
- Joined: Sun Oct 26, 2008 6:32 pm
- Contact:
Re: Adcenter / Adwords Conversion tracking
I'm working on this again. I was hoping to discover nVelocity vars available in the receipt page so I could do on the scriptlet level, but no luck (tried nvelocity order variables from email templates).
So now I'm going to try to put the OrderTotal in a hidden INPUT and set the value of the AdWords conversion to the value of that <%= INPUT.ClientID %>
If anyone has already solved this problem or has an idea for a better way, please let me know.
So now I'm going to try to put the OrderTotal in a hidden INPUT and set the value of the AdWords conversion to the value of that <%= INPUT.ClientID %>
If anyone has already solved this problem or has an idea for a better way, please let me know.
- crockettdunn
- Lieutenant Commander (LCDR)
- Posts: 105
- Joined: Sun Oct 26, 2008 6:32 pm
- Contact:
Re: Adcenter / Adwords Conversion tracking
Here is what I went with.
In the codebehind:
and in the ascx
then the AdWords conversion tracking at the end of the file:
in retrospect my brain wasn't working right when I went with the hidden input, which results in another possible failure point. Two literals would have been simpler .
In the codebehind:
Code: Select all
TotalCharges.Text = string.Format("{0:ulc}", Order.TotalCharges);
//2013.09.26 hcd total charges to hidden input for conversion value tracking
//also insert literal for noscript img tracking of conversion
ConversionValue.Value = TotalCharges.Text.Replace("$", String.Empty); //hidden input
lConversionValue.Text = ConversionValue.Value; //literal
and in the ascx
Code: Select all
<asp:Label ID="TotalCharges" runat="server" Text=""></asp:Label>
<%--//2013.09.26 hcd total charges to hidden input for conversion value tracking --%>
<asp:HiddenField id="ConversionValue" runat="server" />
Code: Select all
<uc:AffiliateTracker ID="AffiliateTracker1" runat="server" />
<!-- Google Code for Completed Online Sale (receipt.aspx) Conversion Page
-->
<!-- //not on dev site -->
<!--script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = ##########;
var google_conversion_language = "en";
var google_conversion_format = "1";
var google_conversion_color = "ffffff";
var google_conversion_label = "$$$$$$$$$$$$$$$$$";
var google_conversion_value = document.getElementById("<%= ConversionValue.ClientID %>").value
var google_remarketing_only = false;
/* ]]> */
</script -->
<!-- script type="text/javascript"
src="//www.googleadservices.com/pagead/conversion.js">
</script -->
<noscript>
<div style="display:inline;">
<!-- img height="1" width="1" style="border-style:none;" alt=""
src="//www.googleadservices.com/pagead/conversion/##########/?value=<asp:Literal id="lConversionValue" Text="" runat="server" />&label=$$$$$$$$$$$$$&guid=ON&script=0"/ -->
</div>
</noscript>