Skip to main content

Setting up Google eCommerce conversion tracking tag in ShopFactory - Knowledgebase / Search Engine Optimization (SEO) - ShopFactory Help Center

Setting up Google eCommerce conversion tracking tag in ShopFactory

Authors list

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.The global site tag must be added in the <head> section of your website. Whereas the event snippet only needs to be added into the specific pages you want to track for specific events.

1. Install the global site tag in your website. 

If you haven't installed the global site tag on your website, copy the code from the link provided below and paste it in ShopFactory Central > Site Analytics/SEO > Website Analytics > Google Analytics code dialog box.

Important: Replace the XXXXXXX with your ID (from your own Google account).  Enter your correct Google ID here to ensure this works.

If using your old UA ID, replace all of the UA-XXXXXXX-1 with your full ID.

Refer to this article - CASE #3

2. Add the tracking code in your Thank you page

Download and save the text file from this link:

Google will move from Universal Analytics to GA4 Analytics which will come in effect July 2023. Copy the updated code from the link below which supports both the old UA (Universal Analytics)  and the new GA4 including the following trigger events:
- Purchase event with product items
- View item details (Navigating to a detailed product page)
- Add/remove a product from a shopping cart
- Add a product to the wishlist (Favorites)
- Initiate the checkout process

The code should be added as a custom content in your "Thank you" page. 

The var GA_MEASUREMENT_ID='XXXXXXX'; in the code should be replaced with your own Google ID by replacing the XXXXXXX.

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 as mentioned in item #1 above

3. Click on the link and highlight or select the entire code (CTRL+A) and then copy (CTRL+C) - Paste (CTRL+V) as custom html in your Thank You page. 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 with the correct Google ID (from your own Google Analytics account)

Enter your correct Google ID here to ensure this works. 

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

6. Optional: Enable "Rebuild All" from Settings menu and do a 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.

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,