Skip to main content

Google Tag Manager Integration

Seamlessly manage tracking codes, marketing tags, and analytics scripts without touching your site's code

Updated this week

Google Tag Manager (GTM) is a powerful tool that allows you to manage JavaScript and HTML tags on your storefront without directly modifying your site's code.

This integration enables you to install scripts for software that Uscreen might not natively support, track custom events, and gain valuable insights into user behavior.

📝 NOTE: GTM integration is available for Uscreen Plus plans. If you're not yet on this plan and need this feature, please discuss an upgrade with our Sales team at sales@uscreen.tv.


Getting Started

Create a GTM Account

If you don't already have a Google Tag Manager account, you'll need to create one:

  1. Click Create Account

  2. Fill out the necessary fields

  3. Enter your storefront domain as the Container Name

  4. Select Web Platform

  5. Click Create

  6. Accept the Terms of Service Agreement on the pop-up

  7. Click Yes to finalize creating your account and GTM container

📝 NOTE: The GTM integration is only available for website tracking and does not track app purchases.

Find Your Container ID

On your GTM Overview page, locate your container ID in the top right corner. Copy and take note of this container ID: GTM-XXXXXXX.

Connect GTM to Uscreen

  1. Navigate to Settings > Integrations

  2. Find Google Tag Manager and click Connect

  3. Enter your container ID and click Connect

ℹ️ INFO: Once connected, GTM will be automatically implemented across your storefront, and there's no need to manually add GTM code snippets to your site's <head> or <body> tags.


Supported Events

Uscreen supports and pushes the following events into GTM as users navigate through your storefront and make purchases.

Event

Description

PageView

Fires when a user views any page on your storefront

ViewContent

Fires when a user visits any content page (URL with /programs/{link_to_program})

InitiateCheckout

Fires when a user reaches the second step of the checkout

Lead

Fires when a customer creates an account

AddPaymentInfo

Fires when a customer successfully enters their payment information

Purchase

Fires when a transaction is completed

📝 NOTE: For first-time transactions, both the AddPaymentInfo and Purchase events will fire. Subsequent purchases will only fire the Purchase event if payment information is saved.

Set up Supported Event Variables

To use these events in your tags or triggers, you need to add them as User-Defined Variables in GTM.

  1. In GTM, navigate to Variables

  2. Click New under the User-Defined Variables section

  3. Name your variable exactly as it appears above (e.g., "ViewContent")

  4. Click Variable Configuration and select Custom Event

  5. Click Save

All events push data in this format (with only the event name changing):

dataLayer.push({
'event': "InitiateCheckout",
'content_name': "Monthly Subscription",
'value': 9.99,
'currency': "USD"
});

ℹ️ INFO: The value sent is the amount after any discounts, such as after a coupon has been applied or in the case of a free trial.


Google Tag Assistant

Google Tag Assistant is a browser extension that helps you verify your GTM implementation and troubleshoot any issues with your tags.

Using Google Tag Assistant

  1. Install the Google Tag Assistant extension for Chrome

  2. Visit your storefront

  3. Click on the Tag Assistant icon in your browser toolbar

  4. It will show you which GTM tags are firing on the page and display any errors

  • Blue tag: Indicates that GTM is installed correctly

  • Green tags: Indicate that your tags are firing properly

  • Yellow tags: indicate warnings that should be addressed

  • Red tags: Indicates errors that need to be fixed

💡 TIP: You can also use the newer Tag Assistant Companion for more advanced debugging capabilities.


Custom Events without Coding

You can set up custom event tracking without any coding knowledge. Here's how:

Set Up the GA4 Configuration Tag

  1. In GTM, navigate to Tags

  2. Click New to create a new tag

  3. Select Google Analytics: GA4 Event

  4. Enter your Measurement ID from Google Analytics

  5. Set the trigger to fire on All Pages

  6. Click Save

Create Custom Event Tags

  1. Create another new tag

  2. Select Google Analytics: GA4 Event

  3. Enter an event name (e.g., "form_submission")

  4. Add the parameters you want to track

  5. Set up a trigger for when this event should fire (e.g., form submissions)

  6. Click Save

⚠️ WARNING: While GTM is a powerful tool, it's considered third-party software that falls outside Uscreen's direct support scope. For complex implementations, you might want to consult with a GTM specialist.


Troubleshooting Tips

If your GTM integration isn't working properly, try these steps:

  1. Verify that your container ID is correct in Uscreen

  2. Check if you may have manually added the GTM code to other areas

  3. Use Google Tag Assistant to test your setup and identify any issues

  4. Ensure you've properly set up your variables and triggers in GTM

  5. Check for browser extensions or ad blockers that might be interfering with tag firing


FAQs

Does Uscreen's GTM integration support revenue tracking?

Our GTM integration doesn't directly support revenue tracking for subscription sales. Instead, we provide a JSON payload on the /checkout/success page that web developers can use to set up custom tracking. Learn more about Checkout Purchase Flow

Can I use GTM to implement other tracking pixels?

Yes! One of the main benefits of GTM is that it allows you to implement various tracking pixels (like TikTok, LinkedIn, etc.) through a single interface without adding multiple code snippets to your site.

Did this answer your question?