Skip to main content
[Growth Hub] Google Analytics

Learn how to set up e-commerce tracking in Growth Hub with Google Analytics 4 (GA4) and Google Tag Manager (GTM).

Updated this week

Setting up e-commerce tracking with Google Analytics 4 (GA4) and Google Tag Manager (GTM) enables comprehensive monitoring of user interactions on your website. This article provides a walkthrough to ensure accurate data collection and analysis.


Step 1: Create GA4 and GTM Accounts (if not already available)

  1. Create a GA4 Account: If you don't have one, set up Google Analytics 4 (GA4) and obtain your Measurement ID. Log in to your Google Analytics account, go to the Admin section, create a new property, and add a web data stream; your Measurement ID will be displayed in the stream details.

  2. Set Up a GTM Container: If you don't have one, go to Google Tag Manager and create a container for your site.

    • For iframe setup: Ensure the same GTM container is implemented on both the parent website (hardcoded or using a different implementation method) and the iframe via the OfficeRnD Admin Portal.


Step 2: Import the Events Container to GTM

  1. Access the Admin Section in GTM:

    • Go to your GTM account and click Admin > Import Container.

  2. Upload the Container File:

    • If you're using an iframe, select the iframe container file.

    • Otherwise, choose the standard container file.

  3. Select Workspace:

    • Use the Default Workspace or create a new one.

  4. Choose Import Options:

    • Select Merge for the import option.

    • Check and Rename conflicting tags, triggers, and variables.

  5. Add Tags to Workspace:

    • Review the list of tags, triggers, and variables that will be added to your GTM container.

    • Click Add to Workspace to complete the import.


Step 3: Configure the GA4 Stream ID and Triggers

  1. Go to the Variables section in GTM.

  2. Locate the variable named constant - GA4 Stream ID (UPDATE).

  3. Update its value with your GA4 Measurement ID (found in your GA4 property settings).

  4. Adjust Triggers for iframe Containers: If you're using the iframe container, applying the eCommerce triggers prefixed with ‘vd_’ for other marketing tags is recommended. This helps prevent the duplication of tag firings.


Step 4: Adjust the GA4 Config Tag

  • If you have already set a GA4 Google Tag:

    • Delete the existing GA4 - config_tag.

  • If you haven't set a GA4 Google Tag:

    • Unpause the tag ‘GA4 - config_tag’ included in the imported container.


Step 5: Publish the Container

  • After ensuring all configurations are correct, click Submit in GTM to publish the container.


Step 6: Verify Event Data in GA4

Events implemented in GA4

The following list comprises all events you implement with this setup:

  1. view_item

    • Description: Triggered when a user views the details of a specific item or Resource.

    • Purpose: Helps analyze which Resources or items attract user interest.

  2. add_to_cart

    • Description: Triggered when a user adds an item to their shopping cart.

    • Purpose: Measures user intent to purchase and identifies popular items or Resources.

  3. begin_checkout

    • Description: Triggered when a user initiates the checkout process.

    • Purpose: Indicates progression towards purchase and helps identify potential drop-off points.

  4. add_payment_info

    • Description: Triggered when a user submits their payment information during checkout.

    • Purpose: Tracks the completion of payment details, a critical step in the purchase funnel.

  5. purchase

    • Description: Triggered when a user completes a purchase transaction.

    • Purpose: Records revenue-generating actions and facilitates sales analysis.

  6. generate_lead

    • Description: Triggered when a user submits a booking request for approval, which is not a direct purchase.

    • Purpose: Captures lead generation activities, allowing for follow-up and conversion tracking.

Professional assistance with Google Analytics

For more advanced setup or assistance with the integration, our partner, VertoDigital, offers expert support to ensure seamless data tracking and optimization tailored to your business needs.

For personalized guidance, you can contact them at [email protected].


Resources

You can download the following resources to use with Google Analytics (click the attachments below):

  • А GTM container to track events when GH is used in an Iframe.

  • А GTM container to teach events when GH is used as a standalone application.

Did this answer your question?