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

You need to have a Google Analytics account to use this module.

This is not a chargeable module/integration and is part of the core modules for all customers. Please speak to your CSM if you would like any more information about this feature.


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.

 

If you have an existing Universal Analytics Property within Google Analytics that you would like to update to GA4, then please follow these steps:

  1. Login to your Google Analytics account

  2. You should be prompted to migrate your existing UA property, selecting your property followed by Save will complete this process for you

     

  3. If you are not prompted to migrate your existing property, at the bottom right of your Google Analytics view, click on the Settings cog and select “Admin”

     

  4. Select the “GA4 Setup Assistant”

     

  5. Select the “I want to create a new Google Analytics 4 property” > “Get started”

     

  6. Click Create & Continue

     

  7. The accessplanit Google Analytics Integration works with Google Tag Manager so please close the ‘Set up Google Tag’ step.

  8. To access your Measurement ID (this will be required in your accessplanit platform), click on the Admin option at the bottom right of your Google Analytics login.

  9. Click on the Data Streams option within your Property

     

  10. Click on the arrow icon on the right to view more details about your stream

    Please note - if you already have a Data Stream for your website, you will need to include both your accessplanit platform and website within one Data Stream. There are instructions for this in step 5 "Setting up Linked Domains”.

     

  11. Copy and keep your Measurement ID somewhere safe as you will need to add this into your accessplanit platform in step 3

     

  12. You can now move on to setting up your Google Tag Manager.

 

 

If you do not yet have a Google Analytics account, then please follow these steps to set up your account and your GA4 Property to track analytics within your accessplanit basket:

  1. Open Google Analytics and follow the steps to create a new Account

  2. Provide a Property to capture your accessplanit basket analytics

     

  3. Complete the remaining steps of the Google Analytics set-up

  4. Set up your data stream using your accessplanit platform’s URL

    1. Please note - if you want to track analytics in your website and your accessplanit platform together, you will need to include both your accessplanit platform and website within one Data Stream. There are instructions for this in step 5 "Setting up Linked Domains”.

     

  5. Once you have created your data stream, click on the arrow icon on the right to view more details about your stream

     

  6. Copy and keep your Measurement ID somewhere safe as you will need to add this into your accessplanit platform in step 3

     

  7. You can now move on to setting up your Google Tag Manager.

 

 


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.

 

If you are not yet using Google’s Tag Manager with your accessplanit platform, please follow these steps before moving onto the next process to set up each of your Tags and Triggers for the integration:

  1. Open Google’s Tag Manager

  2. Click ‘Create Account

     

  3. Enter an Account Name, select your Country, and enter a Container name

     

  4. Click ‘Create

     

  5. Review the Terms of Service and proceed

     

  6. Once you have completed your Account creation, a pop-up will appear containing your Tag Manager code, copy both the <head> and the <body> code and save them somewhere safe as they will be added to your accessplanit platform later.

     

  7. You can now move onto setting up your Tags and Triggers in the “I am currently using Tag Manager - Upgrade your existing Tag Manager to work with GA4” process below.

 

 

If you are already using Google’s Tag Manager with your accessplanit platform or you have just set up your Tag Manager Account, and you would like to track ecommerce events with GA4, you will need to create several Tags and Triggers within your Google Tag Manager.

1 - Tag: Google Analytics: GA4 Configuration

This tag is required to connect your Tag Manager to your Google Analytics 4 property, this tag is not optional.

  1. Open Google’s Tag Manager

  2. Open the Tags menu option

     

  3. Click the ‘New’ button to add a new Tag

     

  4. Select the Tag Type “Google Analytics: GA4 Configuration

    1. Paste your Google Analytics Measurement ID into the Measurement ID field

    2. Save your Tag

       

  5. Click into the Triggering options at the bottom of the page

     

  6. Select the All Pages trigger

     

  7. Enter a label for your Tag and Save

 

You will now create a new Tag and Trigger for each event that you would like to track.

The following events are tracked in your accessplanit basket: Purchases, Add to Cart, Remove from Cart, Initiate the Checkout Process.


2 - Tag: GA4 Purchase Event

This tag is required to track when your customers complete a purchase through your accessplanit Shopping basket/Checkout. We strongly recommend tracking this event.

  1. Within the Tags menu option

     

  2. Click the ‘New’ button to add a new Tag

     

  3. Select the Tag Type ‘Google Analytics: GA4 Event

    1. Configuration Tag: Select your GA4 Configuration Tag

    2. Event Name: purchase
      Please note: the Event Name should match the exact wording above

    3. Event Parameters:
      These are the values used for your event to track individual bits of information. You will need to create variables for each Event Parameter.

      1. Click ‘Add Row', type 'transaction_id’ into the Parameter Name, click on the add button within the Value setting

         

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

      3. Add a new ‘Data Layer Variable’

      4. Set the Data Layer Variable Name to ‘transaction_id’

      5. Click Save

      6. Ensure this Variable is selected as your Value for your transaction_id Event Parameter

         

      7. Repeat the steps i to vi to set up three more Event Parameters for this Event:

        1. currency

        2. value

        3. tax


        You may wish to add some default settings in for each of your parameters, for example if no currency is provided you can default this to ‘GBP’ or ‘USD’. To do this, access the Format Value section within the data variable settings.

    4. Once you have added all of the Event Parameters scroll down to More Settings and check the ‘Send Ecommerce data’ and select ‘Data Layer’.

       

    5. Enter a label for your Tag and Save without Triggers


3 - Tag: GA4 Add to Cart Event

This tag is required to track when your customers add items to their accessplanit Shopping basket/Checkout. If you are not interested in tracking this event, you do not need to configure this tag.

  1. Within the Tags menu option

     

  2. Click the ‘New’ button to add a new Tag

     

  3. Select the Tag Type ‘Google Analytics: GA4 Event

    1. Configuration Tag: Select your GA4 Configuration Tag

    2. Event Name: add_to_cart
      Please note: the Event Name should match the exact wording above

    3. Event Parameters:
      These are the values used for your event to track individual bits of information. You will need to create variables for each Event Parameter.

      1. Click ‘Add Row', type 'Value’ into the Parameter Name, click on the add button within the Value setting

         

      2. Select your existing ‘value’ Data Layer Variable

      3. Repeat the steps i & ii to set up a currency Event Parameter for this Event

         

    4. Once you have added all of the Event Parameters scroll down to More Settings and check the ‘Send Ecommerce data’ and select ‘Data Layer’.

       

    5. Enter a label for your Tag and Save without Triggers

 


4 - Tag: GA4 Remove from Cart Event

This tag is required to track when your customers remove items from their accessplanit Shopping basket/Checkout. If you are not interested in tracking this event, you do not need to configure this tag.

  1. Within the Tags menu option

     

  2. Click the ‘New’ button to add a new Tag

     

  3. Select the Tag Type ‘Google Analytics: GA4 Event

    1. Configuration Tag: Select your GA4 Configuration Tag

    2. Event Name: remove_from_cart
      Please note: the Event Name should match the exact wording above

    3. Event Parameters:
      These are the values used for your event to track individual bits of information. You will need to create variables for each Event Parameter.

      1. Click ‘Add Row', type 'Value’ into the Parameter Name, click on the add button within the Value setting

         

      2. Select your existing ‘value’ Data Layer Variable

      3. Repeat the steps i & ii to set up a currency Event Parameter for this Event

         

    4. Once you have added all of the Event Parameters scroll down to More Settings and check the ‘Send Ecommerce data’ and select ‘Data Layer’.

       

    5. Enter a label for your Tag and Save without Triggers

 


5 - Tag: GA4 Begin Checkout Event

This tag is required to track when your customers open the accessplanit Shopping basket/Checkout. If you are not interested in tracking this event, you do not need to configure this tag.

  1. Within the Tags menu option

     

  2. Click the ‘New’ button to add a new Tag

     

  3. Select the Tag Type ‘Google Analytics: GA4 Event

    1. Configuration Tag: Select your GA4 Configuration Tag

    2. Event Name: begin_checkout
      Please note: the Event Name should match the exact wording above

    3. Event Parameters:
      These are the values used for your event to track individual bits of information. You will need to create variables for each Event Parameter.

      1. Click ‘Add Row', type 'Value’ into the Parameter Name, click on the add button within the Value setting

         

      2. Select your existing ‘value’ Data Layer Variable

      3. Repeat the steps i & ii to set up a currency Event Parameter for this Event

         

    4. Once you have added all of the Event Parameters scroll down to More Settings and check the ‘Send Ecommerce data’ and select ‘Data Layer’.

       

    5. Enter a label for your Tag and Save without Triggers

 


6 - Trigger: Purchase

If you have set up the Purchase Tag in step 2, this trigger is required.

  1. Within the Triggers menu option

     

  2. Click the New button to add a new Trigger

     

  3. Select the Trigger Type ‘Custom Event’

     

  4. Enter the Event name ‘purchase’ and set this to trigger on All Custom Events

     

  5. Give your Purchase Trigger a name and Save

     

  6. Once you have saved your trigger, you need to link it to your Purchase Tag and Google Analytics GA4 Configuration Tag

  7. Within the Tags page

     

  8. Click to open your Purchase Tag

     

  9. Click into the Triggering section at the bottom of the page

     

  10. Select your Purchase Trigger

     

  11. Save the changes to your Purchase Tag

  12. Click to open your Google Analytics GA4 Configuration Tag

     

  13. Click into the Triggering section at the bottom of the page to add an additional Trigger for this Tag

     

  14. Select your Purchase Trigger

     

  15. Save the changes to your Google Analytics GA4 Configuration Tag

 


7 - Trigger Add to Cart

If you have set up the Add to Cart Tag in step 3, this trigger is required.

  1. Within the Triggers menu option

     

  2. Click the New button to add a new Trigger

     

  3. Select the Trigger Type ‘Custom Event’

     

  4. Enter the Event name ‘add_to_cart’ and set this to trigger on All Custom Events

     

  5. Give your Purchase Trigger a name and Save

     

  6. Once you have saved your trigger, you need to link it to your Add to Cart Tag and Google Analytics GA4 Configuration Tag

  7. Within the Tags page

     

  8. Click to open your Add to Cart Tag

     

  9. Click into the Triggering section at the bottom of the page

     

  10. Select your Add to Cart Trigger

     

  11. Save the changes to your Add to Cart Tag

  12. Click to open your Google Analytics GA4 Configuration Tag

     

  13. Click into the Triggering section at the bottom of the page to add an additional Trigger for this Tag

     

  14. Select your Add to Cart Trigger

     

  15. Save the changes to your Google Analytics GA4 Configuration Tag


8 - Trigger: Remove from Cart

If you have set up the Remove from Cart Tag in step 4, this trigger is required.

  1. Within the Triggers menu option

     

  2. Click the New button to add a new Trigger

     

  3. Select the Trigger Type ‘Custom Event’

     

  4. Enter the Event name ‘remove_from_cart’ and set this to trigger on All Custom Events

     

  5. Give your Purchase Trigger a name and Save

     

  6. Once you have saved your trigger, you need to link it to your Remove From Cart Tag and Google Analytics GA4 Configuration Tag

  7. Within the Tags page

     

  8. Click to open your Remove From Cart Tag

     

  9. Click into the Triggering section at the bottom of the page

     

  10. Select your Remove From Cart Trigger

     

  11. Save the changes to your Remove From Cart Tag

  12. Click to open your Google Analytics GA4 Configuration Tag

     

  13. Click into the Triggering section at the bottom of the page to add an additional Trigger for this Tag

     

  14. Select your Remove From Cart Trigger

     

  15. Save the changes to your Google Analytics GA4 Configuration Tag


9 - Trigger: Initiate Checkout

If you have set up the Initiate the Checkout Process Tag in step 5, this trigger is required.

  1. Within the Triggers menu option

     

  2. Click the New button to add a new Trigger

     

  3. Select the Trigger Type ‘Custom Event’

     

  4. Enter the Event name ‘begin_checkout’ and set this to trigger on All Custom Events

     

  5. Give your Trigger a name and Save

     

  6. Once you have saved your trigger, you need to link it to your Begin Checkout Tag and Google Analytics GA4 Configuration Tag

  7. Within the Tags page

     

  8. Click to open your Begin Checkout Tag

     

  9. Click into the Triggering section at the bottom of the page

     

  10. Select your Begin Checkout Trigger

     

  11. Save the changes to your Begin Checkout Tag

  12. Click to open your Google Analytics GA4 Configuration Tag

     

  13. Click into the Triggering section at the bottom of the page to add an additional Trigger for this Tag

     

  14. Select your Begin Checkout Trigger

     

  15. Save the changes to your Google Analytics GA4 Configuration Tag

 

Once you have completed all of the above steps, your Tags page should look something like this:

 

 

 


3. Linking your Google Analytics Account to 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:

 

If you are using accessplanit’s Shopping Basket please follow these steps to link your Shopping Basket to your Google Analytics and Tag Manager Accounts:

  1. From the top right of your platform select the 'Administration' option from the Profile drop-down menu

     

  2. Scroll down and click to open 'Shopping Basket Options'

     

  3. Right-click on the Training Provider that you want to apply your Google Analytics tracking to

  4. Select the ‘Google Analytics Options’ context menu option

     

  5. Add your Google Analytics Measurement ID (beginning with a 'G-') into the Account ID setting

  6. Add your Tag Manager Container ID (beginning with a 'GTM-') into the Google Tag Manager Container ID setting

     

  7. Add your Google Tag Manager <head> and <body> code into all 8 Google Tag Manager settings

     

 

 



4. Testing and enabling Google Analytics & Tag Manager

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

 

 


Troubleshooting

 

  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