Skip to main content

Implement Google Universal Analytics in ConvertPlus and InLine Checkout (with GTM)

Implement Google Universal Analytics in ConvertPlus and InLine Checkout (with GTM)

Last updated: 29-Feb-2024
Rate this article:

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.

   This documentation refers to Google Universal Analytics, which is a deprecated version that will be sunset starting July 1st 2023 for free Universal Analytics properties and starting July 1st 2024 for 360 Universal Analytics properties. We strongly recommend you to migrate as soon as possible to Google Analytics 4 using the data layer that we have on GA4 format.

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 on the Create Account button.

Google analytics via GTM_1.png

3. Fill in all the required fields:

  • Account Name
  • Country
  • Container name
  • Target platform → Web

4. Click on 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.

Google analytics via GTM_2.png

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, then skip to step 5.

If you do not have a Google Universal Analytics Settings variable created for your website tracking, you will need to create one to add the Google Universal Analytics property to which you want to send data by following these steps:

1. In your Google Tag Manager account, navigate to Variables → User-Defined Variables → New.

Google analytics via GTM_3.png

2. From the list provided by Google, select the Google Universal Analytics Settings option as Variable Type. Name your variable “Google Analytics Settings”, so you can easily identify it.

3. Under Tracking ID add the Google Universal Analytics Tracking ID to which you wish to send data.

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

google analytics tracking id.png

5. For cross-domain tracking between your website and the 2Checkout shopping cart, you need to configure cross-domain settings in the Google Universal Analytics variable. This set-up is needed so that Google Universal Analytics 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 separated by a comma in the field named Auto Link Domains: secure.2checkout.com,tracking.avangate.net.

6. Append flags to the Google Universal Analytics cookie with “secure” and “samesite=none”. To do this, in the Google Universal Analytics Settings variable, click on Fields to set, add a new field and type cookieFlags as Field Name and samesite=none as Value secure, as in the example below.

google analytics with GTM_step6_new.png

7. Click Save.

Create the trigger for the Google Universal Analytics Convert Plus Tag

1. In Google Tag Manager, click on the Triggers section and then click to add a new trigger.

Google analytics via GTM_5.png

2. Create two triggers to track the Convert Plus and InLine shopping carts:

  • One for non-interactive events: checkout and purchase.
  • One for interactive events: removeFromCart (for the removeFromCart type of event, the user interacts with an element on the page by clicking the Remove from cart button. This is why this type of event is considered an interactive event by Google Universal Analytics) and addToCart.

Create the non-interactive event trigger

  1. Name your trigger Event Ecommerce Non-interactive.
  2. From the list provided, choose Custom event as Trigger Type.
  3. In the field Event name, type  .*  and check the box Use RegEx matching.
  4. For the "This trigger fires on" section, select Some custom events.
  5. As rule, fill in the boxes with Event matches RegEx (Ignore case) checkout|purchase.
  6. Click Save.

Google analytics via GTM_6.png 

Create the interactive event trigger

  1. Name your trigger Event Ecommerce Interactive.
  2. From the list provided, choose Custom event as Trigger Type.
  3. In the field Event name, type  .*  and check the box Use RegEx matching.
  4. For the "This trigger fires on" section, select Some custom events.
  5. As rule, fill in the boxes with Event matches RegEx (Ignore case) addToCart|removeFromCart .
  6. Click Save.

trigger configuration.jpg

Create the tag for ConvertPlus eCommerce tracking in Google Tag Manager

  1. In the Google Tag Manager interface, click on New Tag.
  2. Create two tags to track the ConvertPlus & InLine shopping carts.
  • One tag for non-interactive events: checkout and purchase
  • One tag for interactive events: removeFromCart

Google analytics via GTM_8.png

Create the tag for Non-interactive events

  1. Name your tag "Google Analytics Convert Plus – Event Type Non-Interactive”, to keep track of your tags easier.
  2. From the list provided by Google, select the option “Google Analytics: Universal Analytics” as Tag Type.
  3. For Category type Ecommerce, select Event as Track Type.
  4. For Action, select Event from the list provided by Google.
  5. In the Non-Interaction Hit field, select True.
  6. For the “Google Universal Analytics Settings” section, select your Google Universal Analytics Settings variable that contains the Google Analytics ID of your account.
  7. Check the box Enable overriding settings in this tag.

Google analytics via GTM_9.png

8. Under More Settings → Ecommerce → Enable Enhanced Ecommerce Features, select True.

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

Google analytics via GTM_10.png

10. In the Triggering section, select the previously configured trigger for non-interactive events: Event Ecommerce Non-interactive.

Google analytics via GTM_11.png

11. Click Save.

Create the tag for Interactive events

  1. Name your tag “Google Analytics Convert Plus – Event Type Interactive”, to keep track of your tags easier.
  2. From the list provided by Google, select the Google Analytics: Universal Analytics option as Tag Type.
  3. Select Event as Track Type.
  4. Select Ecommerce for Category type.
  5. From the list provided by Google, select Event for Action.
  6. In the Non-Interaction Hit field, select False.
  7. For the Google Universal Analytics Settings section, select your Google Universal Analytics Settings variable that contains the Google Analytics ID of your account.
  8. Check the Enable overriding settings in this tag box.

Google analytics via GTM_12.png

 9. Under More Settings → Ecommerce → Enable Enhanced Ecommerce Features, select True.

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

Google analytics via GTM_13.png

11. In the Triggering section, select the previously configured trigger for Interactive events: Event Ecommerce Interactive.

Event Ecommerce Interactive.JPG

12. Click Save.

Enable Enhanced Ecommerce in your Google Universal Analytics account

1. To enable Enhanced Ecommerce in your Google Universal Analytics account, go to Admin → View Settings → Ecommerce settings.

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

Google analytics via GTM_15.png

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, follow these steps:

 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 and tracking.avangate.net.

 

Google analytics via GTM_16.png

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, follow the steps below (make sure your browser is not set to Incognito mode):

 1. Download and install the Tag Assistant Companion browser extension found here.

 2. Click on Preview.

preview GTM.png

3. Delete all existing domains.

delete all domains.png

4. Click on Add domain.

add domain.png

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

click start.png

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

tracking URL.png

7. Click on X in the top-left corner.

connecting to avangate.png

8. In the Tag Assistant Tab, click on Add domain.

add domain tag assisstant tab.png

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

debug buy-link.png

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

debugger.png

11. Click on the Enable button behind the “Connecting this window to avangate.net” pop-up.

enable popup.png

12. Click on Continue.

click continue.png

13. You are now debugging tracking.avangate.net, but this domain receives tags from the shopping cart.

debug success.png

Submit and publish your settings

Google analytics via GTM_20.png

Merchant Control Panel Settings

The Analytics section in your Merchant Control Panel allows you to integrate Google Universal Analytics or/and Google Tag Manager in the ConvertPlus or InLine ordering engines and thus track the behavior of your shoppers on the 2Checkout pages.

Follow these steps to complete your analytics integration:

  1. Log into 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.

web analytics in Merchant Control Panel_5.png

 

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

Select Google Tag Manager with UA

 

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

GTM with UA insert container ID

7. Complete the integration by using 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.

ConvertPlus & Inline Checkout - Activate Google Tag Manager with UA

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

2. 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: https://developers.google.com/tag-manager/enhanced-ecommerce

3. 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 dimension through Google Tag Manager: https://support.google.com/tagmanager/answer/6164990?hl=en .

Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo