# Activate ZoomInfo firmographic data

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

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

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

> **ZoomInfo load time**
>
> Since ZoomInfo 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 ZoomInfo WebSights enabled on your website, with **Website Personalization** turned on in the domain configuration.

## Send data from ZoomInfo to Croct

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

In this tutorial, we will use Google Tag Manager (GTM) to wait for ZoomInfo to resolve the visitor and push the resulting data directly into the user's profile.

### Configure a custom HTML

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

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

3. Set tag type to `Custom HTML`.

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

   **Custom HTML tag**

   ```js
   <script>
     (function() {
       // Check status from session storage
       var status = sessionStorage.getItem('croctUpdated');

       if (status === 'true') {
         return;
       }

       var CROCT_MAX_ATTEMPTS = 5;
       var CROCT_RETRY_DELAY_MS = 1000;

       function tryActivate(attempt) {
         // Retrieve ZoomInfo data from local storage
         var details = localStorage.getItem('_ziVisitorInfo');

         if (details === null) {
           console.log('ZoomInfo data not found.');
           return;
         }

         var data = JSON.parse(details);

         if (data.status !== 'success' || !data.ziDetails) {
           if (attempt < MAX_ATTEMPTS) {
             setTimeout(function() {
               tryActivate(attempt + 1);
             }, CROCT_RETRY_DELAY_MS);
           } else {
             console.log('ZoomInfo data not found after ' + CROCT_MAX_ATTEMPTS + ' attempts.');
           }

           return;
         }

         // Push data to Croct
         croct.user.edit()
           .set('company', data.companyName)
           .set('companyUrl', data.website)
           .set('custom.industry', data.primaryIndustry)
           .set('custom.employees', data.employeeCount)
           .set('custom.revenue', data.revenue)
           .set('custom.firmographic.source', 'ZoomInfo')
           .save();

         // Track event
         croct.track('eventOccurred', {name: 'ZommInfoDataRetrieved'})

         // Update status to prevent updates on every pageview
         sessionStorage.setItem('croctUpdated', 'true');
       }

       tryActivate(1);
     })();
   </script>
   ```

   You can customize the patch payload to track additional data:

   **Add new attributes**

   ```diff
   croct.user.edit()
     .set('company', data.companyName)
     .set('companyUrl', data.website)
     .set('custom.industry', data.primaryIndustry)
     .set('custom.employees', data.employeeCount)
     .set('custom.revenue', data.revenue)
   +  .set('custom.companyFunding', data.companyFunding)
     .set('custom.firmographic.source', 'ZoomInfo')
     .save();
   ```

   Check the [ZoomInfo WebSights documentation](https://tech-docs-library.zoominfo.com/websights-implementation-guide.pdf) (page 11) for the full list of available data points, and the [user reference](/reference/user/overview) for attributes.

5. Select the trigger `Initialization - All Pages` to fire this on all pages.

6. Click **Save**.

Your tag should look like this:

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

This step assumes WebSights payload encryption is **off** (the default). If your domain has the **Decryption Key** toggle enabled, `_ziVisitorInfo.ziDetails` is returned as an encrypted string and must be decrypted with CryptoJS using the key from the Admin Portal before it can be read. See the [ZoomInfo WebSights guide](https://tech-docs-library.zoominfo.com/websights-implementation-guide.pdf) (page 15) for the decryption snippet.

## Check user profiles

Once your GTM tag is published and active, you can verify that the integration is working.

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.

![GTM tag](/assets/immersion/integrations/firmographics/zoominfo/attributes.png)

## Create experiences

Now that Croct is receiving data from ZoomInfo, you can create audiences and [personalize experiences](/immersion/integrations/firmographics/zoominfo/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.
