Skip to content

Instantly share code, notes, and snippets.

@Blainegunn
Created October 10, 2024 00:10
Show Gist options
  • Save Blainegunn/bc6f46bac4baf733ddf9a79c8343d0f8 to your computer and use it in GitHub Desktop.
Save Blainegunn/bc6f46bac4baf733ddf9a79c8343d0f8 to your computer and use it in GitHub Desktop.
Video AA Mock
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment