AdWords Conversion Tracking Codes

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Kris7
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2015 4:52 am

AdWords Conversion Tracking Codes

Post by Kris7 » Tue Jul 28, 2015 9:06 am

Hello,

What is the proper way to implement conversion tracking codes on an Ablecommerce Gold R6? I currently have a conversion code implemented on the receipt.aspx page which I added via FTP. However, it doesn't seem to be firing correctly and seems to attribute conversions to the wrong item (Google PLA'S) as well.

Kris7
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2015 4:52 am

Re: AdWords Conversion Tracking Codes

Post by Kris7 » Tue Aug 18, 2015 5:22 am

Hello again,

I was wondering if a developer could chime in on the proper placement of an AdWords Conversion Code on an AbleCommerce Gold R6 store. :D

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: AdWords Conversion Tracking Codes

Post by nadeem » Thu Aug 27, 2015 6:05 am

Hi Kris7,

Can you please share the code that isn't working for you?

Kris7
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2015 4:52 am

Re: AdWords Conversion Tracking Codes

Post by Kris7 » Tue Sep 01, 2015 5:58 am

The biggest issue is knowing where to implement the code, it should go in the <head> section according to Google's best practices to ensure it fires off at the right time. Right now it's on the check out order finished page .aspx file in the <body> and a few weeks ago it seems to have attributed conversions to the wrong product. Furthermore, Google's Tag Assistant detects it as a non-standard implementation. I just want to know what AbleCommerce's best practice is for implementing this code on their platform.

Code: Select all

<!-- Google Code for GS Sales Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = ##########;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "c9YQCIKwr14Qnq7y3gM";
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/##########/?label=c9YQCIKwr14Qnq7y3gM&guid=ON&script=0"/>
</div>
</noscript>

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: AdWords Conversion Tracking Codes

Post by Katie » Tue Sep 01, 2015 7:06 am

Hello,

If Google has instructions to put the code in the <head> section, then it would seem that this is where it needs to go. The code is Javascript and putting it in the <body> doesn't seem right.
check out order finished page .aspx
Which page are you referring to? Is this the receipt.aspx page?
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Tue Sep 01, 2015 8:03 am

Here's the instructions from AdWords:

Install your tag
To install, copy the code in the box below and paste it between the <body></body> tags of the page you'd like to track. You can then use Google Tag Assistant plugin on Chrome to ensure your code is correctly placed.

Here is a link to their instructions: https://support.google.com/adwords/answ ... 2786649951

You will see the code needs to go in the body section, not the head.

Google Tag Manager code needs to go in the body also.
Contractor's Solutions
www. contractors-solutions.net

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: AdWords Conversion Tracking Codes

Post by jmestep » Wed Sep 02, 2015 1:00 am

On one site, we put the conversion code into a new conlib and then put that at the bottom of the receipt page under Able's AffiliateTracker conlib and it works fine. Their syntax is a little different from your sample, probably because it is older. You could probably put it in the receipt page itself, but this site is tracking other things like Bing and Yahoo, also, so I just made a new conlib.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: AdWords Conversion Tracking Codes

Post by nadeem » Wed Sep 02, 2015 5:57 am

Yes, the tracking code must be placed inside the <body> </body> tags as instructed by Google. First of all, an Adwords account need to be configured from here https://support.google.com/adwords/answ ... 21#get_tag. If you want to track transaction-specific conversion, you have to follow the instruction provided in https://support.google.com/adwords/answer/6095947?hl=en as well.

I have created a sample ConversionTracking control that need to be placed inside Conlib/Custom directory. After this put the control at Checkout/Receipt.aspx below the AffiliateTracker conlib as suggested by Judy.

You just need to update control parameter values to the ones generated for your tag during conversion tacking setup (in the box, below Install your tag). Hopefully it will work as expected. Let me know if you have any issues installing this.

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Wed Sep 02, 2015 1:25 pm

Thanks. I will try it.

Should we leave the var google_conversion_value = <%= Currency%> <%= TotalValue%> or is that supposed to be changed to something like:

var google_conversion_value = 1.00;
var google_conversion_currency = "USD";
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Wed Sep 02, 2015 2:09 pm

When I try to put that in my Receipt.aspx page, do I need to put

Code: Select all

<%@ Register Src="~/ConLib/ConversionTracking.ascx" TagName="ConversionTracking" TagPrefix="uc" %>
at the top?
Contractor's Solutions
www. contractors-solutions.net

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: AdWords Conversion Tracking Codes

Post by nadeem » Wed Sep 02, 2015 10:56 pm

Should we leave the var google_conversion_value = <%= Currency%> <%= TotalValue%> or is that supposed to be changed
No, you don't need to change them. These values will be changed dynamically for the order.
When I try to put that in my Receipt.aspx page, do I need to put

<%@ Register Src="~/ConLib/ConversionTracking.ascx" TagName="ConversionTracking" TagPrefix="uc" %>
You have to make two updates here. First locate

Code: Select all

<%@ Register Src="~/ConLib/Checkout/AffiliateTracker.ascx" TagName="AffiliateTracker" TagPrefix="uc" %>
and replace with

Code: Select all

<%@ Register Src="~/ConLib/Checkout/AffiliateTracker.ascx" TagName="AffiliateTracker" TagPrefix="uc" %>
<%@ Register Src="~/ConLib/Custom/ConversionTracking.ascx" TagPrefix="uc" TagName="ConversionTracking" %>
'

Note that I am using ~/ConLib/Custom/ConversionTracking.ascx because I have put my conversion tracking control inside conlib/custom directory.

Secondly, locate

Code: Select all

<uc:AffiliateTracker ID="AffiliateTracker" runat="server" />
and replace with

Code: Select all

<uc:AffiliateTracker ID="AffiliateTracker" runat="server" />
<uc:ConversionTracking runat="server" id="ConversionTracking" />
By the way, you don't need to change this manually. If you drag and drop the control below the AffiliateTracker, it will register the control automatically.

Make sure to update ######## in below code with the actual values as well.

Code: Select all

<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/#########/?value=<%= TotalValue%>&currency_code=<%= Currency%>&label=#############&guid=ON&script=0"/>

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Thu Sep 03, 2015 12:27 pm

Thanks nadeem, that seems to work. When I view the Receipt page and look at the source code, I see the values. The only thing is, it is Total Value which includes tax and shipping. Is there a way to get the subtotal?
Contractor's Solutions
www. contractors-solutions.net

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: AdWords Conversion Tracking Codes

Post by nadeem » Fri Sep 04, 2015 4:06 am

Yes, for subtotal as a TotalValue, you have to replace

Code: Select all

TotalValue = order.TotalCharges;
To

Code: Select all

TotalValue = order.ProductSubTotal;

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Fri Sep 04, 2015 5:38 am

Thanks again Nadeem, but when I do that it breaks the page.

I am assuming that it is line 8 of the ConversionTracking.ascx that needs to be changed.
Contractor's Solutions
www. contractors-solutions.net

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: AdWords Conversion Tracking Codes

Post by nadeem » Sun Sep 06, 2015 10:47 pm

Sorry, there was a small mistake in the line of code. It should be

Code: Select all

TotalValue = order.ProductSubtotal;
ProductSubtotal 't' should be in lower case.

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Mon Sep 07, 2015 5:22 am

Thanks again Nadeem. I guess that one little capital T messed it up.

Now, it would be nice to get Remarketing working. It must be installed on ALL pages and needs parameters for the following:

Code: Select all

<!-- Google Code for Remarketing Tag -->
<!--------------------------------------------------
Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup
--------------------------------------------------->
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: 'REPLACE_WITH_VALUE',
ecomm_pagetype: 'REPLACE_WITH_VALUE',
ecomm_totalvalue: 'REPLACE_WITH_VALUE',
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1072032839;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</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="//googleads.g.doubleclick.net/pagead/viewthroughconversion/1072032839/?value=0&guid=ON&script=0"/>
</div>
</noscript>

Any ideas on how to get this working?
Contractor's Solutions
www. contractors-solutions.net

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: AdWords Conversion Tracking Codes

Post by nadeem » Mon Sep 07, 2015 6:48 am

Ok. I will create a control and share with you when I will get some time.

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Mon Sep 07, 2015 8:24 am

Great. There are others trying to do this as well.
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Wed Sep 09, 2015 5:59 am

I have just one more thing about Adwords Conversion. What happens when someone checks out using PayPal? They are taken to the PayPpal website to complete their payment.
Contractor's Solutions
www. contractors-solutions.net

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: AdWords Conversion Tracking Codes

Post by nadeem » Fri Sep 11, 2015 5:27 am

Are your adwords conversions not tracking using PayPal? If you have full source code, you can make this working following this article http://www.lovesdata.com/blog/2010/trac ... fLbS5dGSqI

Some one else using adwords conversion codes, may help you with some other workaround without needing full source code.

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: AdWords Conversion Tracking Codes

Post by kwikstand » Sat Sep 12, 2015 5:28 am

I am not sure if it is working. I am trying to figure out why the info is inaccurate. Now that I got the AdWords code up, It shows 4 converted clicks yesterday, but Google analytics shows none. On the 10th, Analytics shows 4 transactions and Adwords shows 3 "converted clicks" and 14 "conversions". I didn't even have that many sales that day. And there is no "conversion value" in dollars showing on Adwords.

When I go to the Receipt page and view source I see the following code on the page:

Code: Select all

<!-- Google Code for test Conversion Page -->
<script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 1072032839; // "Your google conversion id goes here (without quotes)"; e.g. 937091250
    var google_conversion_language = "en"; // your seleced language
    var google_conversion_format = "3"; // conversion format
    var google_conversion_color = "ffffff"; // conversion color
    var google_conversion_label = "3AlnCPW9SBDH2Jf_Aw"; //"Your google conversion label value goes here"; e.g. dZUcCMPHy18QssHrvgM
    var google_conversion_value = USD 575.0000; // e.g. USD 50
    var google_conversion_currency = USD; // e.g USD
    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/1072032839/?value=575.0000&currency_code=USD&label=3AlnCPW9SBDH2Jf_Aw&guid=ON&script=0"/>
</div>
</noscript>
The conversion vale is there, but I have yet to see them in Adwords reports.
Contractor's Solutions
www. contractors-solutions.net

Post Reply