# Activate Demandbase firmographic data

Target high-intent accounts with a tailored message using Demandbase data.

In this tutorial, you will create an experience that displays personalized website content based on a visitor's firmographic data from [Demandbase](https://www.demandbase.com).

By the end, your website will dynamically adapt to an account's industry, company name, or employee count in real time.

> **Demandbase load time**
>
> Since Demandbase usually takes a few moments to load, the firmographic data might not be available on the first page view.

## Prerequisites

Before you start, make sure you have:

- A Croct account with a workspace and application set up.
- The Croct SDK installed in your project.
- The Demandbase Tag enabled on your website.

## Send data from Demandbase to Croct

To personalize the experience, you first need to capture the firmographic data identified by Demandbase and store it in Croct's user profile.

The integration is a single script that listens for the Demandbase identification event and pushes the resulting data directly into the user's profile.

You can add it in one of two ways:

- [Add a script tag](#add-script-tag) directly to your website's source code.
- [Use Google Tag Manager](#use-google-tag-manager) to inject the script without changing the source code.

### Add a script tag \[#add-script-tag]

Add the following script to your website's HTML, either in the `<head>` or the `<body>`:

**Integration script**

```html
<script src="https://cdn.croct.io/plug-integration/demandbase.js"></script>
```

Once loaded, the script waits for Demandbase to identify the visitor and then saves the firmographic data to the visitor's profile.

### Use Google Tag Manager

If you prefer not to edit your source code, you can use Google Tag Manager (GTM) to listen for the Demandbase identification event and inject the script for you.

1. In Google Tag Manager, select **Tags > New**.

2. Name the tag as `Send Demandbase data to Croct`.

3. Set tag type to `Custom HTML`.

4. Copy and paste the following code into the HTML field:

   **Custom HTML tag**

   ```html
   <script src="https://cdn.croct.io/plug-integration/demandbase.js"></script>
   ```

5. Select the trigger `Initialization - All Pages`.

6. Click **Save**.

When the trigger fires, the script reads the firmographic data from Demandbase and saves it to the visitor's profile.

Your tag should look like this:

![GTM tag](/assets/immersion/integrations/firmographics/demandbase/gtm-tag.png)

## Check user profiles

Once the tag is published and active, you can verify that the integration is working. It maps the firmographic data from Demandbase to profile attributes and tracks an event when the data is ingested.

1. Open the [user profiles page](https://app.croct.com/redirect/organizations/-organization-/workspaces/-workspace-/profiles) in the admin app.

2. Filter users using the **Custom attributes** or **Work info** tags and open one profile.

3. Open the **Attributes** tab and confirm that the firmographic data has been successfully ingested.

4. Open the **Timeline** tab and look for the `DemandbaseDataRetrieved` event to confirm when the data was captured.

### Attributes

Company identity is stored using [standard attributes](/reference/user/standard-attributes), while the remaining firmographic data is grouped under the `firmographics` [custom attribute](/reference/user/custom-attributes).

| Attribute                                  | Description                                                                                   |
| ------------------------------------------ | --------------------------------------------------------------------------------------------- |
| `company`                                  | Company name.                                                                                 |
| `companyUrl`                               | Company website domain.                                                                       |
| `custom.firmographics.source`              | Always `Demandbase`, identifying the source of the data.                                      |
| `custom.firmographics.match`               | Level of detail Demandbase resolved for the visitor. Values are either `Detailed` or `Basic`. |
| `custom.firmographics.audience`            | Demandbase audience classification of the visitor.                                            |
| `custom.firmographics.profile.type`        | Company type. Values are either `Public`, `Private`, `Government`, or `Organization`.         |
| `custom.firmographics.profile.industry`    | Industry. For example, `Financial Services`.                                                  |
| `custom.firmographics.profile.employees`   | Employee count range. For example, `1000+`.                                                   |
| `custom.firmographics.profile.revenue`     | Annual revenue range. For example, `$1B+`.                                                    |
| `custom.firmographics.location.city`       | City. For example, `New York`.                                                                |
| `custom.firmographics.location.state`      | State code. For example, `NY`.                                                                |
| `custom.firmographics.location.country`    | Country, as a two-letter ISO code. For example, `US`.                                         |
| `custom.firmographics.stock.fortune1000`   | Whether the company is in the Fortune 1000 list.                                              |
| `custom.firmographics.stock.forbes2000`    | Whether the company is in the Forbes 2000 list.                                               |
| `custom.firmographics.identifiers.company` | Demandbase company identifier.                                                                |
| `custom.firmographics.identifiers.sic`     | Standard Industrial Classification (SIC) industry classification code.                        |
| `custom.firmographics.identifiers.naics`   | North American Industry Classification System (NAICS) industry classification code.           |

Check the [Demandbase API documentation](https://support.demandbase.com/hc/en-us/articles/23816600422811-Firmographic-Attributes-Overview-for-Demandbase-IP-API-v3-Current-Version) for more details.

> **Information levels**
>
> Demandbase resolves visitors at two levels of detail. When the match is `Basic`, only `source`, `match`, and `audience` are available. The remaining attributes, including company identity, are only populated when the match is `Detailed`.

### Event

The [event occurred](/reference/event/types/engagement/event-occurred) event carries the following details:

**Tracked event**

```json
{
  "name": "DemandbaseDataRetrieved",
  "details": {
    "confidence": "Detailed"
  }
}
```

### Troubleshooting

If Demandbase delivers data the integration cannot read, you will see the message below in the browser's console:

> **Error**
>
> \[Croct] Demandbase data is malformed.

This happens when Demandbase hasn't resolved the visitor to a usable profile. It's informational, not an error, and it means we didn't ingest any data for that page view.

## Create experiences

Now that we are receiving data from Demandbase, you can create audiences and [personalize experiences](/immersion/integrations/firmographics/demandbase/playbook).

## Explore

- [Audiences](/explanation/audience/examples/user-attributes): Learn how to create audiences based on the user's attributes.
- [Experiences](/explanation/experience/introduction): Discover what an experience is and how it works.
