---
title: "Drift plugin setup"
date: "2024-02-14T06:18:38+00:00"
summary: "Streamline customer engagement with Drift's chatbot integration for Campaign Studio. Learn how to set up, configure, and synchronize data for personalized conversations and lead scoring."
image:
type: "page"
url: "/campaign-studio/drift-plugin-setup"
id: "77f1c071-d784-4d64-b242-595876d6e14b"
---

Drift is a conversational marketing tool which provides chatbot assistance directly in your web pages.

Drift chat is a conversational bot that pops up at the lower right hand corner of web pages and can be used to engage with customers or prospects. Whenever a customer responds to queries raised by the Drift chatbot, the information is stored and can be used for various marketing practices.

Drift chat performs the following primary functionalities:

*   Offers chatbot assistance on your website(s).
    
*   Creates new contacts or updates data for existing contacts within Campaign Studio.
    
*   Personalizes the chat experience if it can recognize the customer.
    
*   Scores customers based on how far the customers gets within Drift chat and pushes these score updates to Campaign Studio.
    

Using the Drift plugin has two primary phases:

1.  Configuration
    
    *   [Setting up the Drift application](#setting-up-the-drift-application)
        
    *   [Configuring the Drift application in Campaign Studio](#configuring-the-drift-application-in-campaign-studio)
        
    *   [Configuring fields for synchronization](#configuring-fields-for-synchronization)
        
2.  Ongoing usage
    
    *   [Configuring Drift actions for user points](#configuring-drift-actions-for-user-points)
        

Setting up the Drift application
--------------------------------

To set up the Drift application:

1.  Log in to the [Drift Developer Platform](https://dev.drift.com) with your login credentials.
    
2.  In the left panel, click **Apps**.
    
3.  Click **Create New App**.
    
    The system displays the My App page.
    
4.  Navigate to **SETTINGS** > **Display Information** and do the following:
    
    1.  In **App Name**, enter a name for your application.
        
    2.  In **Short Description**, enter a description for your application.
        
5.  Navigate to **SETTINGS** > **Oauth & Scopes** and do the following:
    
    1.  In the **Add Redirect URL** field, specify the callback URL.
        
        You can obtain this URL from the Campaign Studio plugin window for Drift. For more information, see [Configuring the Drift application in Campaign Studio](#configuring-the-drift-application-in-campaign-studio).
        
    2.  Click **Add**.
        
    3.  In the **Drift Scopes** field, select the following scopes:
        
        *   **contact\_read**: Allows an app to listen to changes to contacts and query contacts.
            
        *   **contact\_write**: Allows an app to modify and add contacts.
            
        *   **all\_contact\_read**: Allows an app to change to all the contacts and query contacts.
            
        *   **account\_read**: For accessing, searching, or getting accounts.
            
        *   **playbook\_read**: Retrieves information on playbooks through the API.
            
6.  Navigate to **SETTINGS** > **Webhooks** and do the following:
    
    1.  In the **Request URL** field, specify the URL to which Drift can send information whenever an event occurs.
        
        Specify the value in the format: _(protocol)://<domain-name>/plugin/drift/webhook_.
        
    2.  In the **Subscribe to Webhook Events** field, select the following events:
        
        *   **contact\_identified**: This event is triggered when a contact adds email in chat.
            
        *   **contact\_updated**: This event is triggered when a contact record is updated in Drift.
            
        *   **playbook\_goal\_met**: This event is triggered whenever a goal is met with a previously identified contact.
            
    
    Note
    
    For more information, see [Webhooks](https://devdocs.drift.com/docs/webhook-events-1#configuring-webhooks).
    
7.  Navigate to **Settings** > **App Credentials** and note down the values for **Client ID**, **Secret ID**, and **Verification Token**.
    
8.  Navigate to **ACTIVATE YOUR APP** > **Installing to Drift** and click **Install App to Drift**.
    

Configuring the Drift application in Campaign Studio
----------------------------------------------------

To configure the Drift application in Campaign Studio:

1.  Sign in to your Campaign Studio account.
    
2.  Click the **Settings** icon on the top right corner and select **Plugins**.
    
3.  Click the Drift plugin.
    
    ![Drift plugin page](https://acquia.widen.net/content/q0yfeup6cb/jpeg/campaign-studio_drift-plugin.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
4.  In the **Enabled/Auth** section, specify the values for **Client ID**, **Secret ID**, and **Verification Token** that you noted down from the App Credentials section of the Drift app configuration page.
    
    ![Drift app configuration page](https://acquia.widen.net/content/gg4ygjtrau/jpeg/campaign-studio_drift-app-credentials.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
    ![Drift enabled/auth page](https://acquia.widen.net/content/4m4nl0lu5w/jpeg/campaign-studio_authorizing-drift.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
    Warning
    
    Unless you are done configuring the plugin, set the **Plugin must be enabled and authorized for this field to work** toggle bar to **No** (unpublished). Whenever you make any configuration changes, such as field mapping changes, ensure that you unpublish and re-publish the plugin for all the changes to take effect.
    
5.  Copy the value specified in **Callback URL** and specify the same in **Add Redirect URL**. For more information, see [Setting up the Drift application](#setting-up-the-drift-application).
    
6.  Click the **Authorize App** option.
    
    This opens a pop-up window to authenticate Campaign Studio with Drift. Once authentication is complete, a success message appears that confirms the successful integration.
    

Configuring fields for synchronization
--------------------------------------

Once you have successfully configured Drift with Campaign Studio, you must define the fields mapping for synchronization.

To do so:

1.  Sign in to your Campaign Studio account.
    
2.  Click the **Settings** icon on the top right corner and select **Plugins**.
    
3.  Click the Drift plugin.
    
4.  In the **Features** section, select the **Sync objects between Mautic and this integration** and **Contact** checkboxes.
    
5.  In the **Contact Field Mapping** section, select the Drift field that corresponds to the specific Campaign Studio contacts and select one of the following options:
    
    *   **Sync both ways**: To sync contacts from Campaign Studio to fields in Drift and vice-versa.
        
    *   **Sync only to the integration**: To sync contacts from Campaign Studio to fields in Drift.
        
    *   **Sync only to Campaign Studio**: To sync fields from Drift to contacts in Campaign Studio.
        
    
    ![Drift contact field mapping page](https://acquia.widen.net/content/ztmshdfd2v/jpeg/campaign-studio_drift-contact-field-mapping.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
6.  In the **Enabled/Auth** section, set the **Plugin must be enabled and authorized for this field to work** toggle bar to **Yes** (published).
    
7.  Click **Save & Close**.
    

Configuring Drift actions for user points
-----------------------------------------

If your customers perform certain predefined tasks or attain a certain goal in the Drift chat window, you can ensure that certain points are added to that customer’s profile. You can configure these goals as well as the points which you want to have added to their profile.

To add user points:

1.  Sign in to your Campaign Studio account.
    
2.  Go to **Points** > **Manage Actions** and click **New** to configure points.
    
    ![Manage Actions page](https://acquia.widen.net/content/ni8eqavg40/jpeg/campaign-studio_adding-user-points.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
3.  In the **Name** field, specify a name for the point action.
    
4.  In the **Change points** field, specify the number of points that must be awarded to the customer on attaining the specified goal.
    
5.  In the **When a contact** drop-down menu, select the **Drift Action Playbook goal met** option.
    
6.  In the **Goal type** field, select a specific goal as per your requirement.
    
    ![User points page](https://acquia.widen.net/content/ge0xklmb4s/jpeg/campaign-studio_specifying-new-point-action-drift.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
7.  Save the changes.
    

Testing the Drift and Campaign Studio synchronization
-----------------------------------------------------

1.  Create a publicly-available HTML page to host the Drift chatbot widget.
    
2.  In a browser window, edit your HTML page to add the code to enable the Drift chatbot widget.
    
3.  In another browser window, [sign in to Drift](https://app.drift.com).
    
4.  Navigate to **Settings** > **APP SETTINGS** > **Drift Widget**.
    
5.  Expand **Install** > **Javascript**.
    
6.  Copy the code from the Javascript section and paste it in the browser window where you are editing the HTML page.
    
7.  Publish the page.
    
8.  Open the HTML page with the Drift chatbot in a separate browser.
    
9.  To interact with the chatbot:
    
    1.  Type Hello and press **Enter**.
        
    2.  Type the email address of the contact and press **Enter**.
        
10.  Navigate to [contacts](https://app.drift.com/contacts/) to check the contact you submitted.
     
11.  Navigate to the instance where the plugin is configured. You will see that the contact is also created in Campaign Studio.
     
12.  Add first name, last name, email address, and all other fields that you mapped on the plug-in page.
     
13.  After five minutes, verify that all the changes reflect under drift for the same contact.