Skip to main content

Wistia GTM Event Listener

Track Wistia video interactions in GTM. Monitor play, pause, seek, percentage milestones, and end events with videoAction, videoLabel, and videoHashedID variables.

wistiavideogtmga4content-marketingsaasb2b

Event fired

video

Key variable

videoAction

Wistia

Overview

Wistia is a video hosting platform optimized for business and marketing, featuring lead capture (Turnstile), chapter markers, and detailed viewer analytics. This listener hooks into Wistia's JavaScript API to track video interactions with rich context including the hashed video ID for cross-referencing with Wistia's own analytics.

Event fired: video Variables: videoAction, videoLabel, videoHashedID, videoCurrentTime, videoDuration

Why Use This Listener

Wistia's own analytics are excellent, but you need video events in GA4 to:

  • Cross-reference video engagement with ad campaign performance
  • Build audiences in Google Ads of users who watched specific videos
  • Include video watching in GA4 conversion funnels
  • Send video completion events to Meta for custom audiences

Tracked Events

videoActionDescription
playVideo starts
pauseVideo paused
seekUser seeks to position
endVideo completes
percentwatched-2525% milestone
percentwatched-5050% milestone
percentwatched-7575% milestone
percentwatched-9090% milestone
turnstileLead capture gate shown

Installation

html
<!-- GTM Custom HTML Tag: Wistia Video Listener -->
<script>
window._wq = window._wq || [];
window._wq.push({ id: '_all', onReady: function(video) {
  var tracked = {};
  var milestones = [25, 50, 75, 90];
  
  function wistPush(action, v) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      'event': 'video',
      'videoAction': action,
      'videoLabel': v.name(),
      'videoHashedID': v.hashedId(),
      'videoDuration': v.duration(),
      'videoCurrentTime': v.time()
    });
  }
  
  video.bind('play', function() { wistPush('play', video); });
  video.bind('pause', function() { wistPush('pause', video); });
  video.bind('seek', function() { wistPush('seek', video); });
  video.bind('end', function() { wistPush('end', video); });
  
  video.bind('percentwatchedchanged', function(percent) {
    milestones.forEach(function(m) {
      var key = 'p' + m;
      if (percent * 100 >= m && !tracked[key]) {
        tracked[key] = true;
        wistPush('percentwatched-' + m, video);
      }
    });
  });
  
  video.bind('turnstile', function() { wistPush('turnstile', video); });
}});
</script>

Data Layer Output

Play Event

json
{
  "event": "video",
  "videoAction": "play",
  "videoLabel": "Product Tour - Dashboard",
  "videoHashedID": "abc123def",
  "videoDuration": 185.4,
  "videoCurrentTime": 0
}

Trigger Configuration

All Wistia Events

Trigger: Custom Event | video

Completion Trigger

Condition: DLV – Video Action | equals | end

High-Intent Milestone

Condition: DLV – Video Action | equals | percentwatched-75

Variables to Capture

Variable NameDL KeyExample
DLV – Video ActionvideoAction"play"
DLV – Video LabelvideoLabel"Product Tour"
DLV – Video Hashed IDvideoHashedID"abc123def"
DLV – Video DurationvideoDuration185.4

GA4 Mapping

GA4 EventTriggerParameters
video_startplayvideo_title, video_provider: "wistia", video_id
video_progresspercentwatched-75video_percent: 75
video_completeendvideo_title, video_duration

Debugging

ProblemCauseFix
_wq is not definedWistia not loadedCheck Wistia embed code
Multiple events per play_all matches multiple videosUse specific video hash instead of _all
Turnstile not trackedWistia Turnstile feature not enabledEnable in Wistia account settings

Best Practices

  1. Use videoHashedID to cross-reference GA4 data with Wistia's own viewer analytics
  2. Track Turnstile events, the moment the lead gate appears is a key intent signal
  3. Per-video conversion rates: divide end events by play events per videoHashedID
  4. Combine with Calendly, companies often place Calendly after product videos

Related Listeners