# Hubspot

## Sending AB Tasty campaign data to Hubspot

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-027ad72d55bfef8538b94c254a363373ace4fd18%2F1515d4e795469feee3d476faf55847c2.png?alt=media)

\
You can enrich your HubSpot contact records with AB Tasty campaign data by pushing it via a **custom behavioral event** using the HubSpot API. This allows you to segment, personalize, and automate marketing actions based on which AB Tasty experiments or variations your visitors see.\
\\

## Use Case <a href="#h_01jrj1w4mpnrqqdjf5yj2pb3tp" id="h_01jrj1w4mpnrqqdjf5yj2pb3tp"></a>

Push the following data to HubSpot when a visitor becomes identifiable (e.g. after form submission or login):

* Campaign name
* Campaign ID
* Variation name
* Variation ID
* Emotions AI segmentation (EAI) **(if available on your package)**

## Step-by-Step Guide <a href="#h_01jrj1x9s4c438kte1zqmdwvka" id="h_01jrj1x9s4c438kte1zqmdwvka"></a>

### 1. Create a custom event in HubSpot <a href="#h_01jsxnfnv756cd4zbtc30jj2sv" id="h_01jsxnfnv756cd4zbtc30jj2sv"></a>

1. Go to **Settings > Data Management>Custom Events**
2. Click on **Create event**

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-e852719502bca8b4b17cad78a920797ffea9ad84%2Ff664e22deef8a7b55a6e2fe338061ce6.png?alt=media)

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-06f879ebf63a843af64dfa857469ac73389e162b%2F950f76550ea99774995041b09a1bb9ac.png?alt=media)

### 2. Select how to send event data <a href="#h_01jsxnhsdax0yrt9gsw7jhtyqc" id="h_01jsxnhsdax0yrt9gsw7jhtyqc"></a>

1. #### Select **Send via API** method <a href="#h_01jsxnter7b1cqapcp5xqkzdmb" id="h_01jsxnter7b1cqapcp5xqkzdmb"></a>

   <figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-4239ba731513d155e0b89d960b1a1f61a2e35d16%2Fef9996378761fd0d4150efb8872d91c8.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### 3. Enter events details <a href="#h_01jsxnvd7thmmmkqm381dcz1aq" id="h_01jsxnvd7thmmmkqm381dcz1aq"></a>

1. Enter `ABTASTY` as the event name
2. Add the following event properties as String Property

![Capture d’écran 2025-04-11 à 11.16.14.png](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-a5c19247da77c0dbbd00374d50e5e823b652b553%2F3f08da7e978e2b50819d44841f4ff227.png?alt=media)

\
\
\
3\. Create 5 Properties using this naming convention (repeat the same process for each property)

<figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-235e802639449f9de6fcf4f421bf5ab06a4b4cd9%2Fd486557a87ef5a10e5e6bfd9301958dc.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

* `abt_campaign_name` (Text)
* `abt_campaign_id` (Text)
* `abt_variation_name` (Text)
* `abt_variation_id` (Text)
* `abt_emotions_ai` (Text) // **If you have an Emotions AI License**

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-3e332cb67d6c96c8ba23f46c9bcc8e0610e13a1b%2F13ff245a86eb82e0ad26680349b4d799.png?alt=media)

\
**Once completed, it should look like this**<br>

### 4. Activate Default event properties (Optional) <a href="#h_01jsxnz6yjsh5syecq029qhxkk" id="h_01jsxnz6yjsh5syecq029qhxkk"></a>

If you want more Linked Data. You can activate the **Default event Propertie**

<figure><img src="https://support.abtasty.com/hc/article_attachments/19517525157148" alt=""><figcaption></figcaption></figure>

### 5. Link to Object <a href="#id-01jrj2kgc31egwkcccvr8q84h4" id="id-01jrj2kgc31egwkcccvr8q84h4"></a>

Choose **Contac**t as **a primary object**

### 6. Configuring Tracking ID <a href="#id-01jrj2s6wp668b4mpzpg4d2brq" id="id-01jrj2s6wp668b4mpzpg4d2brq"></a>

Save the Tracking ID and save the creation of your custom event. You'll need it to create our AB Tasty Connector (You can find it again on the HubSpot event details page)

### 7. AB Tasty configuration <a href="#h_01jrj2w18hckhcyyadb3wmr4xc" id="h_01jrj2w18hckhcyyadb3wmr4xc"></a>

Once everything is ready in HubSpot, you can set up the connector in AB Tasty:

1. Navigate to the **Integration Hub** within your AB Tasty account.
2. Use the search bar to find the **HubSpot Card in the PUSH section**.
3. Click on **Create a Connector**.
4. Enter a name for your new connector.
5. Paste the **HubSpot Tracking ID** you generated from the previously created event into the appropriate field.<br>

   <figure><img src="https://support.abtasty.com/hc/article_attachments/19893942387228" alt=""><figcaption></figcaption></figure>
