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 closes | awayMessage:close |
drift – awayMessage:open | away message opens | awayMessage:open |
drift – campaign:click | user clicks to a call to action (CTA) | campaign:click |
drift – campaign:dismiss | user closes a campaign message | campaign:dismiss |
drift – campaign:open | campaign begins | campaign:open |
drift – campaign:submit | user starts a chat or submits an email capture | campaign:submit |
drift – conversation:buttonClicked | when the user clicks on a button as a response to a question | conversation: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 on | conversation:playbookClicked |
drift – conversation:playbookDismissed | user 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 conversation | conversation:playbookFired |
drift – conversation:selected | user selects a conversation from the inbox | conversation:selected |
drift – emailCapture | user 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 buttons | gdprClicked |
drift – message | user receives a message from a team member. | message |
drift – message:sent | user replies to a conversation | message:sent |
drift – phoneCapture | user provides a phone number in chat. Currently, it only works for US phone numbers. | phoneCapture |
drift – scheduling:meetingBooked | user 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 – sidebarClose | sidebar closes | sidebarClose |
drift – sidebarOpen | sidebar opens | sidebarOpen |
drift – sliderMessage:close | slider message is closed | sliderMessage:close |
drift – startConversation | user starts a new chat | startConversation |
drift – welcomeMessage:close | welcome message is closed | welcomeMessage:close |
drift – welcomeMessage:open | welcome message is open | welcomeMessage:open |
- See https://devdocs.drift.com/docs/drift-events for more information
2. Setup
a. Add The Drift Pixel Tag To your account
- open Tag Manager, and add a new tag.

- 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.