Invalid SQL: REPLACE INTO `swsessions` (`sessionid`, `ipaddress`, `lastactivity`, `useragent`, `isloggedin`, `sessiontype`, `typeid`, `dateline`, `status`) VALUES('8oyo7h8j6o7cghce61fvshg8vondwhk6', '', '1721687672', 'CCBot/2.0 (', '0', '40', '0', '1721687672', '0'); (The table 'swsessions' is full) 5-0012-NL-Setting up Google eCommerce conversion tracking tag in ShopFactory - Powered by Kayako SupportSuite Help Desk Software
Login   |   22 Jul 2024 
Support Center » Knowledgebase » 5-0012-NL-Setting up Google eCommerce conversion tracking tag in ShopFactory
 5-0012-NL-Setting up Google eCommerce conversion tracking tag in ShopFactory

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=""></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,

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:

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 "" 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?


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,

Article Details
Article ID: 3690
Created On: 29 Jan 2013 9:39 PM

 This answer was helpful  This answer was not helpful

 Article Options
Home | Knowledgebase | Downloads

Help Desk Software by Kayako SupportSuite v3.70.02