Connect Google Tag Manager to Shopify

This guide covers how to connect Google Tag Manager to your Shopify store using the GroPulse GTM & Data Layer app.

GTM Setup Page

What is Google Tag Manager?

Google Tag Manager (GTM) is a free tool that allows you to manage and deploy marketing tags (snippets of code) on your website without modifying the code directly. It acts as a container for all your tracking pixels and scripts.

Creating a GTM Account

If you don’t have a GTM account yet:

  1. Visit tagmanager.google.com
  2. Sign in with your Google account
  3. Click Create Account
  4. Enter your Account Name (usually your company name)
  5. Select your Country
  6. Enter your Container Name (usually your website URL)
  7. Select Web as the target platform
  8. Click Create
  9. Accept the Terms of Service
GTM Create Account

Finding Your Container ID

Your GTM Container ID is a unique identifier that looks like GTM-XXXXXXX:

  1. Log in to tagmanager.google.com
  2. Look at the top of your workspace
  3. Your Container ID is displayed next to your container name
  4. Copy this ID for use in the app
GTM Container ID Location

Adding Your Container ID to the App

  1. Open the GroPulse GTM & Data Layer app in your Shopify admin
  2. Navigate to GTM Setup from the sidebar or Dashboard
  3. Enter your GTM Container ID in the input field
  4. Click Save

Validation

The app validates your Container ID format:

  • Must start with GTM-
  • Followed by alphanumeric characters
  • Example: GTM-5BNQ4H6B

Activating the App in Your Theme

The app uses Shopify’s Theme App Extension feature, which requires activation:

  1. After saving your Container ID, click Activate
  2. This opens your theme customizer
  3. Ensure the GroPulse GTM app block is enabled
  4. Click Save in the theme customizer

Why Theme Activation is Required

Shopify’s architecture requires explicit activation of theme app extensions for security. This ensures:

  • No unauthorized code injection
  • Clear visibility of what apps modify your theme
  • Easy enable/disable without code changes

Verifying Your Setup

After setup, verify GTM is working:

Method 1: GTM Preview Mode

  1. In Google Tag Manager, click Preview
  2. Enter your store URL
  3. Browse your store
  4. Check that the GTM container is firing
GTM Preview Mode

Method 2: Browser Developer Tools

  1. Open your store in a browser
  2. Right-click and select Inspect
  3. Go to the Network tab
  4. Filter by “gtm”
  5. You should see requests to googletagmanager.com

Method 3: Tag Assistant

  1. Install the Tag Assistant Chrome extension
  2. Visit your store
  3. Click the Tag Assistant icon
  4. Verify your GTM container is detected

Troubleshooting

Container ID Not Saving

  • Ensure the format is correct (GTM-XXXXXXX)
  • Check for extra spaces before or after the ID
  • Try refreshing the page and re-entering

GTM Not Firing

  1. Check App Activation: Ensure the app is activated in your theme
  2. Check Theme Compatibility: The app works with Online Store 2.0 themes
  3. Clear Cache: Clear your browser cache and try again
  4. Check for Conflicts: Disable other GTM apps temporarily

Events Not Appearing in GTM

  1. Verify you’ve configured Data Layer Settings
  2. Check that the correct events are enabled
  3. Ensure your GTM container has triggers set up for these events

Best Practices

  1. Use One Container: Only use one GTM container per store
  2. Test in Preview: Always test changes in GTM Preview mode first
  3. Version Control: Use GTM’s built-in versioning to track changes
  4. Organize Tags: Use folders in GTM to organize your tags
  5. Document Changes: Add notes when publishing new versions

Next Steps

Video Tutorial

Watch our step-by-step video guide for GTM setup:

How to Set Up the GTM & Data Layer App

Last updated on February 16, 2026

Was this article helpful?

PREVIOUS

Set Up GTM Tracking Platforms

NEXT

GTM Server-Side Tracking

Powered by Support Genix