Some content on this site may not be available right now. We are aware and actively monitoring the situation.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Important!

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:

  1. In your browser window, navigate to Tag manager → All accounts.

  2. Click the Create Account button.

  3. Fill in all the required fields:

    • Account Name

    • Country

    • Container name

    • Target platform → Web

  4. Click the Create button.

  5. 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:

1

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.

2

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).

1

Create the non-interactive event trigger

  1. In Google Tag Manager, click Triggers and add a new trigger.

  2. Name your trigger Event Ecommerce Non-interactive.

  3. Choose Custom event as Trigger Type.

  4. In Event name type .* and check Use RegEx matching.

  5. For This trigger fires on select Some custom events.

  6. Rule: Event matches RegEx (Ignore case) checkout|purchase

  7. Click Save.

2

Create the interactive event trigger

  1. Add another trigger and name it Event Ecommerce Interactive.

  2. Choose Custom event as Trigger Type.

  3. In Event name type .* and check Use RegEx matching.

  4. For This trigger fires on select Some custom events.

  5. Rule: Event matches RegEx (Ignore case) addToCart|removeFromCart

  6. 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).

1

Create the tag for Non-interactive events

  1. In Google Tag Manager, click New Tag.

  2. Name your tag: Google Analytics Convert Plus – Event Type Non-Interactive.

  3. Select Google Analytics: Universal Analytics as Tag Type.

  4. For Track Type, select Event.

  5. For Category type select Ecommerce.

  6. For Action select Event from the list.

  7. In Non-Interaction Hit select True.

  8. In Google Universal Analytics Settings select your Google Universal Analytics Settings variable.

  9. Check Enable overriding settings in this tag.

  1. Under More Settings → Ecommerce → Enable Enhanced Ecommerce Features select True.

  2. Check Use Data Layer to capture eCommerce information from the data layer provided by 2Checkout.

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

  1. Click Save.

2

Create the tag for Interactive events

  1. Click New Tag.

  2. Name your tag: Google Analytics Convert Plus – Event Type Interactive.

  3. Select Google Analytics: Universal Analytics as Tag Type.

  4. For Track Type select Event.

  5. For Category type select Ecommerce.

  6. For Action select Event from the list.

  7. In Non-Interaction Hit select False.

  8. In Google Universal Analytics Settings select your Google Universal Analytics Settings variable.

  9. Check Enable overriding settings in this tag.

  1. Under More Settings → Ecommerce → Enable Enhanced Ecommerce Features select True.

  2. Check Use Data Layer to capture eCommerce information from the data layer provided by 2Checkout.

  1. In Triggering, select the Event Ecommerce Interactive trigger.

  1. Click Save.

Enable Enhanced Ecommerce in your Google Universal Analytics account


  1. In Google Universal Analytics go to Admin → View Settings → Ecommerce settings.

  2. Make sure Enable Ecommerce & Enable Enhanced Ecommerce Reporting are both ON.

This information applies to Google Universal Analytics without GTM as well.

Exclude the 2Checkout domains from the referral list


To exclude the 2Checkout domains from the referral list in your Google Universal Analytics account:

  1. Go to Admin → Property settings → Tracking info → Referral Exclusion List.

  2. Add your website’s domain and the following 2Checkout domains:

    • secure.2checkout.com

    • tracking.avangate.net

This information applies to Google Universal Analytics without GTM as well.

Test your Google Universal Analytics Settings


To test if your Google Universal Analytics settings are correct (do not use Incognito mode):

  1. Download and install the Tag Assistant Companion browser extension from: https://chrome.google.com/webstore/detail/tag-assistant-companion/jmekfmbnaedfebfnmakmokmlfpblbfdm.

  2. In Google Tag Manager click Preview.

  3. Delete all existing domains in the preview configuration.

  4. Click Add domain.

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

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

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

  8. In the Tag Assistant tab, click Add domain.

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

  10. Go back to the Google Tag Manager debugger tab.

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

  12. 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.

  1. Log in to your Merchant Control Panel.

  2. Navigate to Setup → Ordering options.

  3. Click on the Analytics tab.

  4. Click on the ConvertPlus and InLine Checkout tab.

  5. In the Google Tag Manager box, click Set up.

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

  7. 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.

  • 2Checkout data layer for tracking through Google Tag Manager is placed in an iFrame. This data layer has an eCommerce object that contains eCommerce information built on the structure required by Google Universal Analytics reporting for the following events: checkout, add to cart, product impressions (for cross-sells), purchase, and remove from cart.

  • For fully enhanced eCommerce reporting in Google Universal Analytics, it is recommended that you send information to Google Universal Analytics from your website that includes product impression, product detail, and add to cart. More information on enhanced eCommerce reporting and how to send Product View and Add to Cart data to Google Universal Analytics can be found here.

  • In addition to the eCommerce object, the data layer also contains an event called cartUpdated that includes additional parameters with information on the shopping cart. These parameters can be used to capture further information in custom dimensions. Refer to the Google Documentation on how to build custom dimensions through Google Tag Manager.

Last updated

Was this helpful?