Overview

The Demandbase IP Address API enables you to easily identify your anonymous visitors on your website so you can serve more targeted content and close more named accounts.  The Demandbase API returns firmographic attribute data for identified companies that visit your website, and integrates seamlessly with Reactful Personas.  You'll be able to further personalize your website experience such as:

  • Target custom experience for named accounts
  • Personalize content based on firmographics data such as industry, company size, etc.
  • Show offers only to visitors who match custom variables

Requirements

  1. You must have an active Demandbase account
  2. Your Custom Reactful Code must be installed on your website
  3. Your Reactful account must be "Live"

Integration Setup

  1. Insert the following snippet either via your tag manager or directly on your website. The snippet should ideally load as early as possible on the initial website visit, and before your existing Reactful tag.

NOTE: You must update the CUSTOMER_API_KEY value with an active Demandbase API key.

<!-- BEGIN Demandbase - Reactful Integration plugin -->
<script>
    (function() {
        function verifySessionStorage() {
            try {
                var t = "__ss_test__";
                window.sessionStorage.setItem(t, t);
                window.sessionStorage.removeItem(t);
                return true;
            } catch (e) {
                return false;
            }
        }
 
        var demandbase_data = null;
        var isSessionStorageAvailable = verifySessionStorage();
 
        if (isSessionStorageAvailable) {
            demandbase_data = window.sessionStorage.getItem("custom_vars_data");
        }
 
        if (isSessionStorageAvailable && demandbase_data === null) {
            var url = "https://api.company-target.com/api/v2/ip.json?key={CUSTOMER_API_KEY}";
            var xhr = new XMLHttpRequest();
            xhr.open('GET', url, true);
            xhr.onload = function() {
                if (xhr.readyState == xhr.DONE) {
                    if (xhr.status === 200) {
                        var jsonResponse = JSON.parse(xhr.responseText);
                        for (var key in jsonResponse) {
                           if ((key == "watch_list") && (jsonResponse.hasOwnProperty(key))) {
                              var watch_list = jsonResponse[key];
                              for (var watchListObj in watch_list) {
                                    if (watch_list.hasOwnProperty(watchListObj)){
                                     jsonResponse["wl_"+ watchListObj] = watch_list[watchListObj]
                                    }
                                }
                           }
                        }
                        window.sessionStorage.setItem("custom_vars_data", JSON.stringify(jsonResponse));
                    }
                    else if (xhr.status !== 200) {
                        console.log("Error", err);
                    }
                }
            };
            xhr.send();
        }
    })();
</script>
<!-- End Demandbase - Reactful Integration plugin -->


2. Go to the Reactful Studio and follow the steps to create a new Persona.

3. Click the Settings icon next to Custom Variables.

5. A pop up window will appear where you can add the variable keys and values you’d like to define for your persona.  Once complete, click the Save & Close button.
Each key should correspond to the attributes in the Demandbase API.

NOTE: If you have any Watch List attributes, please reference the attributes by preceding the key with "wl_" (e.g. for the "account_list" attribute, use "wl_account_list").

Below is a sample of the returned company information from Demandbase.

6. Once your variables have been added in the settings, close the pop up window and click on the word ‘Custom Variables’.

7. Select the variables you’d like to include/exclude in your Persona, then save the Persona so it can be used in your reaction.

8. Create your new reaction and include the persona you created.  The reaction will now only appear for visitors matching your persona criteria.

Troubleshoot

Please contact Reactful Support via our online chat or email support@reactful.com if you require any assistance with your integration setup.

Did this answer your question?