Articles on: FAQ

How to Set Up Google Analytics in Google Tag Manager

Learn how to add the Google Analytics tag to GTM and ensure it respects consent preferences using Pandectes.


Introduction


Google Tag Manager (GTM) is a powerful tool that allows you to manage and deploy tags, such as Google Analytics, without modifying your Shopify theme code.


When integrated with Pandectes GDPR Compliance, GTM can ensure that tracking scripts only run based on the consent given by your visitors. One of the most commonly used tags in GTM is Google Analytics, which provides deep insights into user behavior across your store.


If you haven’t integrated GTM with Pandectes yet, check out our GTM integration guide.



Step-by-Step Guide to Add Google Analytics in GTM


Step 1: Open Your GTM Workspace


  • Visit https://tagmanager.google.com
  • Sign in with your Google Account
  • In the Accounts tab, select your container
  • Under Workspaces, go to Tags and click New


Step 2: Configure the Google Analytics Tag


In the tag setup panel:


  1. Name your tag (e.g., GA4 Config)
  2. Click Tag Configuration
  3. Select the Google Analytics tag type from the Featured Tags section and choose Google Tag
  4. In the Tag ID field, enter your GA4 ID (e.g., G-XXXXXXX)
  5. (Optional) If you're using a custom pixel for page views:
  • Click Add Parameter under Configuration Settings
  • Set parameter name to: send_page_view
  • Set value to: false
  1. In the Triggering section, choose Initialization – All Pages


Step 3: Save and Publish


  • Click Save
  • Then click Submit to publish the tag live on your store

Updated on: 15/07/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!