Google Tag Manager Template for Drift New

This is an unofficial Google Tag Manager template for the Drift App.

Use this template to set up Drift on your website and capture Drift events. Events flow into Google Tag Manager events so that you can easily integrate them with your analytics and marketing software.

Table of contents
1. How it works
2. Setup 
  a. Add The Drift Pixel Tag To your account 
  b.Setup a trigger to use the Drift events  
  c. Send Events To Google Analytics 
  d. Test your events en Google Analytics 
 

1. How it works

The template automatically capture all events and send them to Google Tag Manager as events.

GTM Event Name Triggers When.. Original Drift Event Name
drift – awayMessage:close away message closesawayMessage:close
drift – awayMessage:open away message opensawayMessage:open
drift – campaign:click user clicks to a call to action (CTA)campaign:click
drift – campaign:dismiss user closes a campaign messagecampaign:dismiss
drift – campaign:open campaign beginscampaign:open
drift – campaign:submit user starts a chat or submits an email capturecampaign:submit
drift – conversation:buttonClicked when the user clicks on a button as a response to a questionconversation:buttonClicked
drift – conversation:firstInteraction site visitor receives their first message in each unique conversation thread, or each distinct conversation id, associated with a bot playbook.conversation:firstInteraction
drift – conversation:playbookClicked the user interacts with a playbook from a greeting by clicking onconversation:playbookClicked
drift – conversation:playbookDismisseduser dismisses a message from a playbook by clicking on the close button next to the message.conversation:playbookDismissed
drift – conversation:playbookFired leadbot playbook fires for the first time in a new conversationconversation:playbookFired
drift – conversation:selected user selects a conversation from the inboxconversation:selected
drift – emailCaptureuser identifies through an Email Capture Campaign, completes an email capture form inside the Widget, or if they type their email into a message.emailCapture
drift – gdprClicked event works with the Drift GDPR consent form and will fire whenever a site visitor clicks on the yes or no consent buttonsgdprClicked
drift – message user receives a message from a team member.message
drift – message:sent user replies to a conversationmessage:sent
drift – phoneCapture user provides a phone number in chat. Currently, it only works for US phone numbers.phoneCapture
drift – scheduling:meetingBookeduser books a meeting with a member of your team.scheduling:meetingBooked
drift – scheduling:requestMeeting Schedule Meeting card is pushed to a conversation.scheduling:requestMeeting
drift – sidebarClosesidebar closessidebarClose
drift – sidebarOpensidebar openssidebarOpen
drift – sliderMessage:close slider message is closedsliderMessage:close
drift – startConversationuser starts a new chatstartConversation
drift – welcomeMessage:closewelcome message is closedwelcomeMessage:close
drift – welcomeMessage:openwelcome message is openwelcomeMessage:open

2. Setup

a. Add The Drift Pixel Tag To your account

  • Search for Drift in Templates > Search Gallery and add it to your workspace.
  • Copy your Drift ID from Drift Admin
  • Copy your Drift ID
  • Add your Drift ID to the new tag.
  • Select trigger as all page views. (or the pages you want Drift to show up)

b. Setup a trigger to use the Drift events

  • Create a new trigger > Select Custom events
  • To capture all events that Drift sends add enter event name drift and select use regex matching
  • To capture individual events use the event table above.

c. Send Events To Google Analytics

  • Create a new google Analytics tag for events
  • For the event action name select {{event}} this will dynamically pass the Drift events as event action
  • For trigger select the event you created.
  • and Save

d. Test your events en Google Analytics

  • Click on refresh preview in GTM and reload your website
  • On your website trigger the images and you should see images in the Google Analytics Realtime view immediately.

Final Thoughts

We hope that this template saves you time and helps you measure the impact of your marketing better.

Let us know if you have any questions let us know in the comments.