Login   |   07 Oct 2024 
Support Center » Knowledgebase » 5. Search Engine Optimization » 5-0012-EN-Setting up Google eCommerce conversion tracking tag in ShopFactory
 5-0012-EN-Setting up Google eCommerce conversion tracking tag in ShopFactory
Article

Google conversion tracking tag is used to track clicks on your website as conversions. To add this tag to your website, follow the instructions below.

Tracking means recording the usage of a site by visitors. Part of the usage is the sales conversions information; the tracking tag that sends the sales conversions information should be on the "Thank you" page of your shop.
(Note: If you are accepting PayPal payments, make sure you turn ON the "Auto Return" option in your PayPal account for the orders to be tracked correctly. Refer to the information provided below this article.)

How to use the tracking tag
For conversion tracking to work, you'll need to install the conversion tracking tag, which consists of a global site tag and an event snippet.

1. Install the global site tag on every page of your website.
If you haven't installed the global site tag on your website, copy the tag below and paste it between the head tags (<head></head>):

<!-- Global site tag (gtag.js) - Google Ads: XXXXXXXXX --> <script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-XXXXXXXXX'); </script>

This can be done via the Google Analytics Code dialog box. Please refer to CASE #3 in this KB article,
http://support.shopfactory.com/kayako/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=5241

2. Download and save the text file from this link:

We have updated the download link below to use the the new Google Global Site Tag (GTAG). We have replaced the deprecated code which is no longer active within the Google Analytics library and should be updated. Download the new code using global site tag from this link:

http://download.shopfactory.com/support/googletracking-gtag.zip

The code should be added to custom code on the Thank you page. The UA-XXXXXXXX-1 in the code should be replaced with your own Google ID.

The code assumes that the gtag (Global site tag) has been installed website wide in the Google Analytics box in SF Central page or website custom code. (See step #1 above)

----------------------------------

  • Click on the link and save the zip file to a directory or local folder. 
  • Once download is completed, open the directory/folder where you saved the file. 
  • Right click on the "googletracking.zip" file and select "Extract Here...".  A text file (googletracking-gtag.txt) will appear; double-click to open the file in your default text editor, i.e. Notepad.

3. Copy the entire code (as it is; make sure there are no line breaks in the code provided) and paste as custom html in your Thank You page. Please refer to this KB article on how to Add HTML code in ShopFactory.  

How do I add a custom HTML code to a page or to my entire website?

http://support.shopfactory.com/kayako/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=348

 

4. Important: Replace the XXXXXXX {(in the line: getTracker("UA-XXXXXXX-1")} with the correct ID (from your own Google Ads/Analytics account)

Enter your correct Google ID here to ensure this works.

5. The code should be at the top location (set location/position to 1).

6. You may need to enable "Rebuild All" from Settings menu -> and then Preview in External browser.

(Untick Rebuild All before publishing.)

7. Publish your shop again so that the changes are uploaded online.

 

NOTE: Accepting PayPal payments?

To ensure your orders paid in PayPal are correctly tracked by Google - setup up the Auto Return URL so buyers are immediately redirected back to your shop.

4-0089-EN- PayPal payments: Setting up Auto Return URL so buyers are immediately redirected back to shop

 

With Auto Return for Website Payments, your buyers are redirected back to your site immediately after clicking the Pay button on the Payment Confirmation page.

Refer to this PayPal article for more information,

https://www.paypal.com/au/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside



Article Details
Article ID: 424
Created On: 01 Feb 2011 12:00 AM

 This answer was helpful  This answer was not helpful

 Back
 Search
 Article Options
Home | Knowledgebase | Downloads
Language:

Help Desk Software by Kayako SupportSuite v3.70.02