Yes, you can track YouTube video interactions in Google Analytics 4 (GA4) via Google Tag Manager (GTM) in Webflow without reloading the videos or manually adding tracking elements. Follow these steps to set it up efficiently.
1. Add GTM to Webflow
- Go to Webflow Project Settings > Custom Code.
- Paste your GTM container code in the Head section.
- Publish your site to ensure GTM is live.
2. Enable Built-in YouTube Video Trigger in GTM
- Go to GTM > Triggers > New.
- Select YouTube Video as the trigger type.
- Check the events you want to track, such as Start, Pause, and Complete.
- Select All Videos or define specific conditions.
- Save the trigger.
3. Create GTM Tag for GA4 Event
- Go to Tags > New.
- Select GA4 Event as the tag type.
- Choose your GA4 Configuration Tag for setup.
- In Event Name, enter a custom name like
youtube_interaction
. - Under Event Parameters, add relevant values:
video_title
– {{Video Title}}video_percent
– {{Video Percent}}video_url
– {{Video URL}}- Attach the YouTube Video trigger created earlier.
- Save and submit changes.
4. Test Tracking with GTM Preview & Debug
- Click Preview in GTM and enter your Webflow site URL.
- Play a YouTube video and check for the YouTube Video event in the GTM Debug console.
- Verify that GA4 receives the event in the Events DebugView (found in GA4 under Admin > DebugView).
Summary
You can track YouTube video interactions in GA4 using GTM without reloading videos or adding extra tracking elements. Simply enable the YouTube trigger in GTM, create a GA4 event tag, and test your setup.