Skip to content

Instantly share code, notes, and snippets.

@Blainegunn
Created October 10, 2024 00:10

Revisions

  1. Blainegunn created this gist Oct 10, 2024.
    40 changes: 40 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    const eventName = // play, pause, impression
    const verb = // get verb from widget
    const video = // data-video-source, Video name or VideoID
    const container = //Block video is in, for example How To block
    const eventData = // timestamp on when video was clicked and other metadata

    const event = {
    documentUnloading: true,
    data: {
    eventType: 'web.webinteraction.linkClicks',
    web: {
    webInteraction: {
    linkClicks: { value: 1 },
    type: 'other',
    name: eventName,
    },
    },
    _adobe_corpnew: {
    digitalData: {
    "primaryEvent": {
    "eventInfo": {
    "interaction": {
    "click": data-video-source,
    "iclick": "true"
    },
    eventName: eventName,
    name: eventName,
    videoNameOrId: video,
    verb: verb,
    container: container,
    eventData
    }
    }
    },
    },
    },
    };


    window._satellite.track('event' event);