Implementing Google Analytics Ecommerce tracking via Google Tag Manager

This article assumes that you have a working knowledge of Google Tag Manager, especially triggers and tags, and that you have already integrated Google Analytics with your Xola account. Step by step instructions from start to finish are available in this article; An overview is listed in steps 1 through 5 below.


In Short

1. Install your Google Analytics tracking code via Google Tag Manager
2. If your Google Analytics tracking code is currently hard-coded on your website, we recommend removing it and installing it directly through Google Tag Manager (GTM) to prevent any conflicts that might affect Xola’s integration.

3. Create a Custom Event trigger in Google Tag Manager with the event name xolaTransaction.

4. Create a Universal Analytics tag with the track type Transaction, and add your Google Analytics ID.

5. Set the trigger to the xolaTransaction event you created in step 2.

6. Publish!


Implementation Instructions 

 

1. Install Google Tag Manager on your site

a) Google Tag Manager includes two snippets of code. One is placed as high as possible in the <head> tag, and the other is placed immediately after the opening <body> tag.

Resources: Google Tag Manager Setup and Installation

 

2. Add Universal Analytics in Google Tag Manager

a) On the left side-panel in your Google Analytics container, select Tags and then click the New button.

skitch.png

b) Name your new Universal Analytics tag (we named ours "GA Tracking - Xola.com") and click inside the Tag Configuration box to select the tag type.

skitch.png

c) Select Universal Analytics.

skitch-2.png

d) Add your Universal Analytics Tracking ID and make sure the Track Type is set to Page View.

Resources: How to find your tracking code, tracking ID, and property number

skitch.png

e) Select More Settings > Fields to Set and set the allowLinker field to true.

f) Select More Settings > Cross Domain Tracking and enter your website domain name(s) and xola.com in the Auto Link Domains field, separated by commas.

Example: website.com, xola.com

f) Click Save.

g) Select the Triggering box to choose when to fire your Universal Analytics tracking tag.

skitch.png

h) Select All Pages to fire the Universal Analytics tag on all pages of your site.

skitch.png

i) Click Save.

j) Click on the Triggering box and select Add Exception.

k) Under Choose a Trigger, click the + button in the top right corner

k) Name the trigger (i.e. Xola Checkout Pageview) and select Trigger Configuration

l) Select the Page View trigger

m) Select Some Page Views and set the condition Page URL contains xola.com

 n) Click Save.

o) Click Save again.

3. Enable Ecommerce Tracking in your Google Analytics Account

a) In Google Analytics, go to your account’s Admin panel and click on Ecommerce Settings for the view that you’d like to track.

b) Select Enable Ecommerce and set the toggle to On.

c) Click Next Step and then select Done.

4. Add Your Website Domain to the Referral Exclusion List

  • Go to your account’s Admin panel and click on Tracking Info in the property column.
  • Select Referral Exclusion List from the drop down menu.
  • Click the Add Referral Exclusion Button.
  • Enter your website domain name in the text box, and click Create.

 

5. Add a xolaTransaction Event Trigger in Google Tag Manager

 a) In Google Tag Manager, create a Custom Event trigger in the container you are using with the event name xolaTransaction.

i. On the left side-panel in your Google Tag Manager container, select Triggers and then click the New button.

skitch.png

ii. Name your new trigger (we named ours Xola Transaction) and click inside the Trigger Configuration box to select the trigger type.

skitch.png

iii. Select the trigger type Custom Event.

skitch.png

iv. Under “Event name” add the text xolaTransaction.

skitch.png

v. Click Save.

 

6. Add a Universal Analytics Transaction Event tag in Google Tag Manager

a) On the left side-panel in your Google Tag Manager container, select Tags and then click the New button.

skitch.png

b) Name your new Universal Analytics Transaction tag (we named ours GA Transactions - Xola.com) and click inside the Tag Configuration box to select the tag type.

skitch.png

c) Select Universal Analytics.

skitch.png

d) Add your Universal Analytics Tracking ID and set the Track Type to Transaction.

skitch.png

e) Select the Triggering box to choose when to fire your Universal Analytics Transactions tag.

skitch.png

f) Select Xola Transactions (or whatever you named your Custom Event) under Choose a trigger.

skitch.png

 

7. Publish Your Google Tag Manager Container

 a) Click Publish.

skitch.png

b) Wait 24 hours, and check your Google Analytics account for transactional data!



Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments