Overview
The GTM integration lets you:- Inject GTM on any page where your TrackPlay video is embedded
- Fire
dataLayerevents for all key player interactions - Trigger GA4, Facebook Pixel, TikTok Pixel, or any other tag from a single TrackPlay integration
Setup Instructions
Step 1: Get Your GTM Container ID
- Log into Google Tag Manager
- Select your container. The ID is shown at the top right, e.g.
GTM-XXXXXXX.
Step 2: Connect in TrackPlay
- Go to Integrations in your TrackPlay dashboard
- Find Google Tag Manager and click Connect
- Enter your Container ID (e.g.
GTM-XXXXXXX) - Click Save. The integration is active immediately.
Events Fired to dataLayer
TrackPlay fires these events towindow.dataLayer:
Each event includes a
trackplay property with context data (e.g. videoCode).
Using Events in GTM
Example: Fire GA4 event on video play
- In GTM, create a new Trigger
- Type: Custom Event
- Event name:
trackplay_play
- Create a new Tag
- Type: Google Analytics: GA4 Event
- Event name:
video_start - Trigger: the trigger you just created
- Publish your container
Example: Fire a pixel on CTA click
- Create a trigger for Custom Event
trackplay_cta_click - Create your pixel tag (for example Meta) that fires on that trigger
- Publish your container
Purchases and other conversions are not sent to the dataLayer. The sale happens on your cart’s page after the viewer leaves the video, so TrackPlay reports it server-side (Meta CAPI, GA4 Measurement Protocol, TikTok Events), not through GTM.
Troubleshooting
GTM not injecting
- Verify the Container ID starts with
GTM-and is correct - Check that the integration shows Active status in TrackPlay
- Open the browser console. You should see the GTM snippet loaded.
Events not firing
- Use GTM Preview mode to inspect the dataLayer
- Confirm your TrackPlay video is loading correctly on the page
