Skip to content

Instantly share code, notes, and snippets.

Trevor trevorfox

Block or report user

Report or block trevorfox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@trevorfox
trevorfox / drift-events.js
Last active Jun 5, 2019
Drift Data Layer Events
View drift-events.js
// Read more on the blog posts: https://trevorfox.com/2019/01/drift-event-tracking-google-tag-manager/
// Data Layer event values to be pushed according to their driftEventName
var driftEvents = [
{driftEventType: 'sidebar', driftEventName: 'sidebarOpen', driftEventDescription: 'sidebar opened'},
{driftEventType: 'sidebar', driftEventName: 'sidebarClose', driftEventDescription: 'sidebar closed'},
{driftEventType: 'welcome message', driftEventName: 'welcomeMessage:open', driftEventDescription: 'welcome message opened'},
{driftEventType: 'welcome message', driftEventName: 'welcomeMessage:close', driftEventDescription: 'welcome message closed'},
{driftEventType: 'away message', driftEventName: 'awayMessage:open', driftEventDescription: 'away message opened'},
{driftEventType: 'away message', driftEventName: 'awayMessage:close', driftEventDescription: 'away message closed'},
You can’t perform that action at this time.