PrintNowPrintNowDocs

Google Tag Manager

Configure Google Tag Manager to manage tracking tags on your storefront without code changes.

Google Tag Manager (GTM) lets you deploy and manage marketing and analytics tags on your storefront without editing code. When you enter a GTM Container ID here, PrintNow automatically injects the GTM initialization scripts into every page of your storefront. You can then use the Google Tag Manager web interface to add, edit, and remove tags for services like Google Ads, Meta Pixel, LinkedIn Insight, and others.

GTM works alongside the separate Google Analytics integration. Both share the same dataLayer object on the storefront, so events tracked by GA4 are also available to any GTM tags you configure.

Configure Google Tag Manager

  1. From your Unified Admin, go to Settings > Partner Apps > Google > Google Tag Manager.
  2. Enter your GTM Container ID (e.g., GTM-XXXXXXX).
  3. Click Save.

To disable GTM, clear the Container ID field and save.

Settings

FieldDescription
Container IDYour Google Tag Manager container ID (format: GTM-XXXXXXX). Find this in your GTM account under Admin > Container Settings. When set, PrintNow injects the GTM scripts into every storefront page. Leave blank to disable.

How It Works

When a valid Container ID is configured, PrintNow uses a response filter to automatically inject two GTM code snippets into every storefront page:

  1. Head script -- The GTM initialization snippet is injected into the <head> tag. This loads the GTM library asynchronously and initializes the dataLayer array. If Content Security Policy (CSP) is enabled on your storefront, the script tag automatically includes the correct nonce attribute.

  2. Body noscript fallback -- A <noscript> iframe is injected after the opening <body> tag. This provides basic GTM functionality for visitors with JavaScript disabled.

No additional configuration is needed on the storefront side. The scripts are injected at the HTTP response level before the page reaches the browser.

Associations

AreaEffect
All storefront pagesThe GTM container script is injected into every page served by the storefront. Tags configured in your GTM container (conversion tracking, remarketing pixels, heatmaps, etc.) fire automatically based on the triggers you define in the GTM web interface.
dataLayer eventsPrintNow pushes events to window.dataLayer (shared with GA4). GTM tags can use these events as triggers, including page views and e-commerce events like purchases.
CSP complianceIf your storefront uses Content Security Policy headers, GTM inline scripts are automatically tagged with a nonce attribute so they execute without CSP violations.

On this page