# Drift

[Drift](https://www.drift.com/) is a platform that uses conversational marketing and sales to help your company grow revenue. Sales and marketing teams can be further aligned on Drift to create a coordinated customer experience.

Freshpaint allows you to identify users and track their interactions with your site. This can provide you valuable insights on your customers.

{% hint style="warning" %}
Client-side only integrations cannot be used in HIPAA mode.
{% endhint %}

## Destination Information

* Accepts [track](https://documentation.freshpaint.io/sources/precision-tracking) and [identify](https://documentation.freshpaint.io/readme/setting-up-identify) calls.
* Connection Modes:

<table><thead><tr><th width="100" align="right"> </th><th data-type="checkbox">Client-side</th><th data-type="checkbox">Server-side</th></tr></thead><tbody><tr><td align="right">Web</td><td>true</td><td>false</td></tr><tr><td align="right">Mobile</td><td>false</td><td>false</td></tr><tr><td align="right">Server</td><td>false</td><td>false</td></tr></tbody></table>

## Getting Started

1. Navigate to the Drift destination configuration and click "Details".

<div align="center"><figure><img src="/files/Djg7QqeWwrKwE6PUtG4W" alt=""><figcaption></figcaption></figure></div>

2. Configure your Drift token. You can find this by going to Settings > App Settings > Drift Widget > Install > Javascript and selecting the token in quotes in  the Drift.load() call:&#x20;

<figure><img src="/files/cbHe9jcX4TLmyJX9f4b9" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/plpxLCPInlQwC6o4otBK" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/KhewEVYlwztpmJ9MzMd5" alt=""><figcaption></figcaption></figure>

3\. That's it! You should now see the [enabled status](https://documentation.freshpaint.io/readme/setting-up-your-destinations/enabling-and-disabling-a-destination) next to Drift.

## Identify

Once your integration is set up correctly, you should [set up identify calls.](https://documentation.freshpaint.io/readme/setting-up-identify) This will help you gather important information about your users such as their phone number and user id.

When you call [freshpaint.identify()](https://documentation.freshpaint.io/readme/setting-up-identify), Freshpaint will create or update a user by calling Drift's identify method which calls Drift's identify api endpoint at: <https://event.api.drift.com/identify>. Read more about user identification in Drift [here](https://devdocs.drift.com/docs/user-identification).

Here is an example of an identify call:

```
freshpaint.identify("ada.lovelace@example.com", {
    /* user properties */
    "email": "ada.lovelace@example.com",
    "name": "Ada Lovelace",
    "role": "mathematician",
    "specialty": "computer languages"
});
```

You can find your contacts in Drift under Visitors > Contacts:

<figure><img src="/files/tKdK9WR9bqV4Hj3el9rf" alt=""><figcaption></figcaption></figure>

## Events

When you send an event to Drift, Freshpaint will call their [track method](https://devdocs.drift.com/docs/contact-properties#drifttrack) which calls their event API endpoint at: <https://event.api.drift.com/track> in order to create a new event.

#### Seeing Freshpaint Events in Drift

Once the Drift integration is enabled, you can now set it as an event destination in the event definition in order to start sending events to Drift:

<figure><img src="/files/4hN6HXOXMxEEFNON49LK" alt=""><figcaption></figcaption></figure>

You can view the events associated with each contact by clicking on the contact profile and viewing their Activity Timeline.

<figure><img src="/files/hAFI6nqyR4Kp8EcJgC7v" alt=""><figcaption></figcaption></figure>

### Pageview Events

Freshpaint will automatically send all pageview events to Drift by using by calling the same Drift track method for events. You'll see them in the Activity timeline for the identified user.

<figure><img src="/files/8IUvuqilGX1svnM5jlyn" alt=""><figcaption></figcaption></figure>

## Configuration Options

### Event Transformations

Set up transformations to modify your data before it's sent to your destination. Read more about transformations [here](https://documentation.freshpaint.io/transformations).

<figure><img src="/files/aOKkpLvEjEmGXuzLhTCA" alt=""><figcaption></figcaption></figure>

### Connection Mode Settings

Only client-side connection mode is available for this destination. Events originating from the user's web browser will be sent directly to Drift.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.freshpaint.io/integrations/destinations/apps/drift.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
