Drift is very useful and elegant chat solution for Websites.

If you don’t want to install Drift not with plugin but via Javascript, you can do it.

From the onboarding page, select to install Drift via JavaScript

Copy the JavaScript code

In Google Tag manager, choose to create a new tag and click to create a “Custom HTML Tag”

Paste the Drift code in the “Configure Tag” section

Choose to fire on “All pages”. Click to “Create Tag” and name it.

Done!

If you want to track Drift Events via Google Tag Manager

<script>
ga('create', 'UA-XXXXXXXX', 'auto');
window.drift.on('startConversation', function() {
ga('send', 'event', 'Drift Widget', 'Chat Started');
console.log('Chat Started'); /* Can be commented out */
});
window.drift.on("emailCapture", function(data) {
ga('send', 'event', 'Drift Widget', 'Email Captured');
console.log('Email Captured'); /* Can be commented out */
});
window.drift.on("scheduling:meetingBooked", function(data) {
ga('send', 'event', 'Drift Widget', 'Meeting Booked');
console.log('Meeting Booked'); /* Can be commented out */
});
</script>