Integrating with GA4 using Google Tag Manager

Depending on your GA4 setup, you may need to route the Intelligems experience_impression event from the Data Layer to GA4 using Google Tag Manager. This step-by-step guide will help you set up the Tag in Google Tag Manager to do this.

  1. Add an Intelligems setting so that the GA4 event is added to the Data Layer. In your theme code, above the Intelligems script in the <head> of the theme, add:

    <script>
      window.igSettings = {
        useDataLayer: true
      }
    </script>

  2. In Google Tag Manager (GTM), first create the Variable. Select "Variables" then "New":

  3. Click on "Variable Configuration":

  4. Choose "Data Layer Variable":

  5. Enter exp_variant_string for Data Layer Variable Name, title the variable exp_variant_string, and click Save:

  6. Now create the tag. Click "Tags" then click "New":

  7. Click Tag Configuration:

  8. Choose Google Analytics:

  9. Choose Google Analytics: GA4 Event

  10. Enter your GA4 Measurement ID, enter experience_impression as the Event Name, enter exp_variant_string as the Event Parameter, and choose exp_variant_string as the Event Value by clicking on the variable picker icon (choosing the Variable we created in step 5):

  11. Click Triggering:

  12. Click Trigger Configuration:

  13. Choose Custom Event:

  14. Enter experience_impression for Event Name, title the trigger experience_impression , and click Save:

  15. Click Submit:

  16. Click Publish:

  17. Give the version a name and click Continue:

Last updated

Was this helpful?