Implement Google Universal Analytics in ConvertPlus and InLine Checkout (with GTM)
Overview
You can implement Google Universal Analytics and Google Tag Manager tracking tools to help you track and monitor your ConvertPlus and InLine checkout orders to improve the shopping experience and increase the conversion rate.
Availability
Google Universal Analytics and Google Tag Manager can be set for all 2Checkout accounts.
Google Universal Analytics Settings
Implement Google Universal Analytics
To implement Google Universal Analytics through Google Tag Manager (GTM) for your ConvertPlus and InLine Checkout, follow these steps:
In your browser window, navigate to Tag manager → All accounts.
Click the Create Account button.

Fill in all the required fields:
Account Name
Country
Container name
Target platform → Web
Click the Create button.
Copy the Google Tag Manager Container ID. It will be used in the 2Checkout Merchant Control Panel for the Google Tag Manager set-up.

Create a Google Universal Analytics Settings variable in Google Tag Manager
If you already have a Google Universal Analytics Settings variable with your Google Universal Analytics Tracking ID, skip to the next section. If not, create one:
Create the Universal Analytics Settings variable
In your Google Tag Manager account, navigate to Variables → User-Defined Variables → New.

From the list provided by Google, select the Google Universal Analytics Settings option as Variable Type. Name your variable “Google Analytics Settings”.
Under Tracking ID add the Google Universal Analytics Tracking ID to which you wish to send data.
To get your Google Universal Analytics Tracking ID, navigate to Google Universal Analytics → Admin → Tracking Info → Tracking Code. You will find the code under Tracking ID. Copy and add it to your variable.
Configure cross-domain tracking & cookie flags
For cross-domain tracking between your website and the 2Checkout shopping cart, configure cross-domain settings in the Google Universal Analytics variable so Google counts a shopper coming from your website to the 2Checkout shopping cart as the same visitor.
Go to More Settings → Cross Domain Tracking and type the following domains (comma-separated) into Auto Link Domains: secure.2checkout.com,tracking.avangate.net
Append flags to the Google Universal Analytics cookie with “secure” and “samesite=none”:
In the Google Universal Analytics Settings variable, click on Fields to set.
Add a new field:
Field Name: cookieFlags
Value: samesite=none secure
Click Save.

Create the trigger for the Google Universal Analytics Convert Plus Tag
In Google Tag Manager, create triggers to capture Convert Plus and InLine shopping cart events. You should create two triggers: one for non-interactive events (checkout and purchase) and one for interactive events (addToCart and removeFromCart).
Create the non-interactive event trigger
In Google Tag Manager, click Triggers and add a new trigger.
Name your trigger Event Ecommerce Non-interactive.
Choose Custom event as Trigger Type.
In Event name type .* and check Use RegEx matching.
For This trigger fires on select Some custom events.
Rule: Event matches RegEx (Ignore case) checkout|purchase
Click Save.

Create the interactive event trigger
Add another trigger and name it Event Ecommerce Interactive.
Choose Custom event as Trigger Type.
In Event name type .* and check Use RegEx matching.
For This trigger fires on select Some custom events.
Rule: Event matches RegEx (Ignore case) addToCart|removeFromCart
Click Save.

Create the tag for ConvertPlus eCommerce tracking in Google Tag Manager
You will create two tags: one for non-interactive events (checkout and purchase) and one for interactive events (addToCart/removeFromCart).
Create the tag for Non-interactive events
In Google Tag Manager, click New Tag.
Name your tag: Google Analytics Convert Plus – Event Type Non-Interactive.
Select Google Analytics: Universal Analytics as Tag Type.
For Track Type, select Event.
For Category type select Ecommerce.
For Action select Event from the list.
In Non-Interaction Hit select True.
In Google Universal Analytics Settings select your Google Universal Analytics Settings variable.
Check Enable overriding settings in this tag.

Under More Settings → Ecommerce → Enable Enhanced Ecommerce Features select True.
Check Use Data Layer to capture eCommerce information from the data layer provided by 2Checkout.

In Triggering, select the Event Ecommerce Non-interactive trigger.

Click Save.
Create the tag for Interactive events
Click New Tag.
Name your tag: Google Analytics Convert Plus – Event Type Interactive.
Select Google Analytics: Universal Analytics as Tag Type.
For Track Type select Event.
For Category type select Ecommerce.
For Action select Event from the list.
In Non-Interaction Hit select False.
In Google Universal Analytics Settings select your Google Universal Analytics Settings variable.
Check Enable overriding settings in this tag.

Under More Settings → Ecommerce → Enable Enhanced Ecommerce Features select True.
Check Use Data Layer to capture eCommerce information from the data layer provided by 2Checkout.

In Triggering, select the Event Ecommerce Interactive trigger.
Click Save.
Enable Enhanced Ecommerce in your Google Universal Analytics account
In Google Universal Analytics go to Admin → View Settings → Ecommerce settings.
Make sure Enable Ecommerce & Enable Enhanced Ecommerce Reporting are both ON.

Exclude the 2Checkout domains from the referral list
To exclude the 2Checkout domains from the referral list in your Google Universal Analytics account:
Go to Admin → Property settings → Tracking info → Referral Exclusion List.
Add your website’s domain and the following 2Checkout domains:
secure.2checkout.com
tracking.avangate.net

Test your Google Universal Analytics Settings
To test if your Google Universal Analytics settings are correct (do not use Incognito mode):
Download and install the Tag Assistant Companion browser extension from: https://chrome.google.com/webstore/detail/tag-assistant-companion/jmekfmbnaedfebfnmakmokmlfpblbfdm.
In Google Tag Manager click Preview.

Delete all existing domains in the preview configuration.

Click Add domain.

Add https://tracking.avangate.net/ and click Start.

Go back to the Google Tag Manager tab but don’t close the tab with tracking.avangate.local.

Click the X in the top-left corner of the preview pane.

In the Tag Assistant tab, click Add domain.

Enter the buy-link you want to debug and click Start.

Go back to the Google Tag Manager debugger tab.

Click Enable behind the Connecting this window to avangate.net pop-up.

Click Continue.

You are now debugging tracking.avangate.net, which receives tags from the shopping cart.

Submit and publish your settings.

Merchant Control Panel Settings
The Analytics section in your Merchant Control Panel allows you to integrate Google Universal Analytics and/or Google Tag Manager in the ConvertPlus or InLine ordering engines and track shopper behavior on 2Checkout pages.
Log in to your Merchant Control Panel.
Navigate to Setup → Ordering options.
Click on the Analytics tab.
Click on the ConvertPlus and InLine Checkout tab.

In the Google Tag Manager box, click Set up.

Fill in the Google Tag Manager code (Here is how you obtain it) and click Save.

Use the slider to activate Google Tag Manager. It is not recommended to activate both Universal Analytics and Google Tag Manager to send data to the same Google Universal Analytics view, otherwise duplicate data will occur.

Related documentation
Last updated
Was this helpful?