Drift Live Chat

Integrate with Drift Live Chat

Ruler Analytics allows you to Integrate with your Drift Live Chat and pass New Leads as a conversion into your Ruler account.

To get started Ruler Analytics will need to pass our Visitor ID, as a variable into your Live Chat product, Please add the following Script to your website in the footer.

<script type="text/javascript">

function rulerAnalyticsToDrift() {
                drift.on('ready', function() {
                        rulerAnalyticsID: RulerAnalyticsVisitorId


The Ruler Visitor Id, should now be pushing to the customers chat along with the visitors details like name etc, in order to see this in against the visitor in the conversation details, and be able to pass this as variable via Webhooks, we would need to do the following steps:

Step 1
Go to https://app.drift.com/contacts/contact-settings and login (if it asks) then click the Custom Attributes button (highlighted below)


Step 2
You should see somewhere the data attribute rulerAnalyticsId, once you have located this if you hover over the row, you should see the three dots appear towards the end of the row click on the three dots.


Step 3
A menu should now appear, if you click the "Show in conversation" option, this will now enable the custom attribute to be visible with the visitors details.


Step 4
Now if you start a new chat and then locate the chat in your conversations section click the details button at the top of the page (if it is not already opened on the right), you might then need to click the" view more attributes" in order to see the rulerAnalyticsId


Step 5 - Send Chats as webhooks to Ruler Analytics

Once you have the Variable passing to your Live Chat tool, you can now send your new conversations using webhooks to Ruler, allowing us to add these to your Form reports.

You will first need to create a new ‘Ruler Analytics’ App in Drift.

Please ensure you give the app Scope to ‘contact_read’

Once you have authorised the App, you can now use Drifts Webhooks to send the new chats to Ruler Analytics.

Drifts documentation on using webhooks can be found here.

We would recommend using the following event action.


Your account manager will be able to provide you with your ‘Request url’ to post to, upon request.

Any questions, please contact [email protected]