Integrate your Basket with Google Analytics (GA4)

Integrate your Basket with Google Analytics (GA4)

The Google Analytics module allows you to synchronise your Shopping Basket with your Google Analytics account to gain valuable statistics. Both Google Analytics and Google Tag Manager are supported!

Google Analytics 4 logo

What is Google Analytics 4?

Following Google’s depreciation of Universal Analytics (UA) in June 2023, the accessplanit Google Analytics integration has been updated to instead integrate with Google Analytics 4 (GA4).

UA focused on tracking user interactions on websites and mobile apps, to do this it used cookies and unique identifiers to track each user and their journey across your website and apps. As it reported on user behavior and conversions, it was very well-suited for tracking web analytics! GA4

GA4, however is even further evolved! It provides a more comprehensive / user-centric understanding of your customers' journeys across multiple platforms; including your website, apps, and any other digital channels (such as your accessplanit shopping basket). Here are some of the key benefits of GA4:

  1. GA4 is focused on event-based tracking which means that you can report more closely on specific activities that your customers are completing (such as adding items to their basket).

  2. As GA4 does not use solely cookies to track your users, it can readily track your customers across multiple devices and platforms, it also leads to more accurate data as cookies can be deleted and/or blocked!

  3. Where UA tracks user sessions i.e. each visit they make to your website, GA4 tracks users over time! This means that you can better understand your complete customer journey and their interactions over time, allowing you to provide a more comprehensive and personalised experience to encourage returning users.

Your accessplanit integration with GA4 still tracks page hits and user behaviour as it did for UA, however the new integration with GA4 also tracks ecommerce activity such as the value of baskets and purchases, and we have implemented support for key basket events such as tracking purchases, and items being added and removed from the basket!

This guide will talk you through each step of the GA4 setup through Google Analytics and Google Tag Manager, to ensure everything is set up correctly and to gain all the new benefits from the integration!


Using the Google Analytics Module

Google Analytics is an additional module, please have a chat to your Customer Success Manager if you would like to add this to your platform!

To use the Google Analytics module, you will require a GA4 Account and Google Analytics enabled in your platform.


1. Setting up your Google Analytics 4 Account

Please note, this step is only required if you do not yet have an existing Google Analytics 4 Property to use for your integration with accessplanit

Please follow one of the below processes to set up your GA4 Account. If you already have a Universal Analytics property with Google Analytics, please follow the first process. If you do not currently use Google Analytics, please follow the second process.

 

 

 


2. Setting up your Google Tag Manager

Please note, this step is required if you use Google Tag Manager and you would like to track ecommerce events such as purchases.

If you do not have a Tag Manager account, please follow both of the below processes to set up your Google Tag Manager.

If you already use Tag Manager, please skip past the “I am not currently using Tag Manager - Setting up Tag Manager” process to the “I am currently using Tag Manager - Upgrade your existing Tag Manager to work with GA4” process.

 

 

 


3. Linking your Google Analytics Account to your accessplanit platform

The third step of setting up your Google Analytics integration is to add your Google IDs into your accessplanit platform.

Once you have configured your Google Analytics Property and Tag Manager, you are ready to update your accessplanit platform!

Please follow the below steps for Shopping Basket OR Checkout, depending on which tool you are using in your platform to take bookings. If you are unsure which tool you are using, please ask a member of the accessplanit team to check for you:

 

 

 



4. Testing and enabling Google Analytics & Tag Manager

The final step of setting up your Google Analytics integration is complete testing and complete your Tag Manager changes.

If you wish to test your Tag Manager changes within Google’s Debug Mode, please follow the debug process below, otherwise skip ahead to submit your Tag Manager changes.

 

 


5. Setting up Linked Domains

The container for accessplanit MUST be separate to the container used for your own website in order to work. Each domain should have its own container, with its own GTM ID.

If you also have Google Analytics configured on your website, this step is to link the two together so that you can track your customers' journeys across both your website and your shopping basket.

 

 


Troubleshooting

Conflicts with other scripts

If you are facing issues integrating Google Tag Manager and Google Analytics 4 with the checkout process but are having difficulty with the cross-domain tracking.

It could be down to a JavaScript issue, see this Google article:
https://support.google.com/analytics/answer/10071811?hl=en

Cross-domain measurement works by creating an event listener on the document node of a page. When users click a link, the click event bubbles up to the document node and the parameter _gl is added to the link URL. This process cannot work properly in the following scenarios:

  • When the navigation is triggered by JavaScript as opposed to a direct response to a user action.

  • When competing scripts in the page stop the event propagation before it reaches the document node; for example, when Event.stopPropagation() is used.

 

  1. The ecommerce information (value, tax and currency) are not pulling into Google Analytics / my monetisation reports are not tracking revenue
    Some set-ups require the value, tax, and currency variables to be defined with ‘ecommerce.’ at the beginning of their name. If your integration is not reporting these numbers, the first thing to try is adding ‘ecommerce.' at the beginning.
    To do this:

    1. Open Google Tag Manager

    2. Open the Variables page on the left

    3. Click on your ‘currency’ variable in the ‘User-Defined Variables’ section on your page

    4. Update the ‘Data Layer Variable Name’ for this variable to be ecommerce.currency

    5. Repeat this process for your tax variable, updating its ‘Data Layer Variable Name’ to ecommerce.tax

    6. Repeat this process for your value variable, updating its ‘Data Layer Variable Name’ to ecommerce.value

 

  1. My item information is not pulling into my Google Analytics so I cannot compare the different Courses that people are booking through the basket
    Some set-ups require the items to be specifically included in the Google Tag Manage configuration.
    If your integration is not reporting on your basket items, the first thing to try is adding a new variable of ‘items’ into your tags.
    To do this:

    1. Open Google Tag Manager

    2. Open the Tags page on the left

    3. Click on your ‘Add to cart’ tag

    4. Click to add a new row within your Event Parameters and call it ‘Items’

    5. Click on the add button within the Value setting

    6. Click the + icon at the top right of the ‘Choose a Variable’ screen

    7. Add a new ‘Data Layer Variable’

    8. Set the Data Layer Variable Name to ‘ecommerce.items’ or ‘items’ (this is based on whether you have needed to include ‘ecommerce.’ for your value, tax and currency variables)

    9. Click Save

    10. Ensure this Variable is selected as your Value for your Items Event Parameter

    11. Save the changes to your 'Add to Cart' tag

    12. From the Tags page, click on your ‘Purchase’ tag

    13. Click to add a new row within your Event Parameters and call it ‘Items’

    14. Click on the add button within the Value setting

    15. Select your existing your existing ‘Items’ Data Layer Variable

    16. Ensure this Variable is selected as your Value for your Items Event Parameter

    17. Save the changes to your 'Purchase' tag

    18. From the Tags page, click on your ‘Remove from cart’ tag

    19. Repeat steps M to Q for this tag




FAQs

 

  1. Where can I find my Google Analytics Tracking/Measurement ID?
    You can find this within your Google Analytics page by viewing your accessplanit data stream, click on the arrow icon on the right to view more details about your stream, and see the Measurement ID.



  2. Where can I find my Google Tag Manager Container ID
    You can find this within your Google Tag Manager page by viewing the GTM code which is displayed as a link close to the top of the page besides the Workspace Changes.



  3. Where can I find my Tag Manager Tracking Code
    You can find this within your Google Tag Manager page by clicking on the the GTM code which is displayed as a link close to the top of the page besides the Workspace Changes.



  4. Can we use Google Tag (gtag.js) instead of Google Tag Manager?
    The integration only supports Google Tag Manager.

  5. Are any events retriggered if a user refreshes their basket?
    If you are using the accessplanit Shopping Basket tool then events such as begin_basket will not retrigger when a user refreshes their page.
    If you are using the accessplanit Checkout Basket tool, then the begin_basket and the add_items events will retrigger when a user refreshes their page.

  6. If one of my customers makes a booking with Courses from two different Training Providers, which Google Analytics details will be used?
    Within your platform there is a ‘Main’ Training Provider setup which is used for purposes like this! If you do not know what your platform’s Main Training Provider is, please ask a member of the accessplanit team to find this out for you.

  7. Do I need to tick the “Send Data on Confirmation Step” option in my Google Analytics Options?
    No, this setting is for the legacy Universal Analytics integration only and it will be removed in the coming weeks

     

  8. Do I enter my Linked Domains into my Google Analytics Options?
    No, this setting is for the legacy Universal Analytics integration only and it will be removed in the coming weeks

     

  9. If a user is shopping in the basket, and they open the basket again on another device or browser, will this trigger an ‘Initiate Basket’ event again?
    Yes it will to track the user opening up their basket again

 

 


Contact Our Team

If you can't find what you're looking for, access our Support Portal, and our team of experts will be happy to help!

Is it your first time contacting the team? Learn how to raise a support ticket.

Follow Us

Facebook|height=20 LinkedIn|height=20 Instagram|height=20 Twitter|height=20

Copyright © 2024 accessplanit.

Social media icons by icons8.com