Integrate Google Analytics 4 and Demandbase

  • Updated

Context

The Demandbase Tag sends Company Profile Attributes to Custom Dimensions in Google Analytics 4 (GA4). The Demandbase One integration lets you add Demandbase Firmographics to your Google Analytics (GA) account and enables a richer B2B view of what’s happening with visits to your website.

Important:

  • Google is replacing Universal Analytics with GA4 in July 2023 (see the Google documentation). To maintain GA reporting continuity with Demandbase data, set up the Demandbase integration with GA4 before July 2023.
  • The Demandbase integration with GA4 is separate from an integration with Universal Analytics. Any current integrations set up with Universal Analytics will not be affected by new integrations set up with GA4.
  • If you have an integration set up with Universal Analytics, you can skip to Step 6: Set Up Custom Dimensions to set up a new integration with GA4.

Follow the steps below to set up the integration.

Step 1: Ensure the Demandbase Tag is Deployed

If you have not deployed the Demandbase Tag to your website, see Deploy Demandbase One Tag.

Step 2: Ensure You Have GA4 and Google Tag Manager (GTM)

See the Google documentation to see if you are using GA4 and GTM.

Tip: An integration with Google Universal Analytics can be used at the same time as an integration with GA4. See Integrate Google Analytics with Demandbase to set up an integration with a Universal Analytics property.

Step 3: Select the Demandbase Attributes to Capture

Demandbase provides you with over 40 firmographic attributes you can use to collect data about the company traffic coming to your site. Within GA4, you can set up as many as 50 event-scoped custom dimensions. We recommend starting with the following 12 attributes in GA4.

  1. Demandbase SID
  2. Company Name
  3. Industry
  4. Sub Industry
  5. Employee Range
  6. Revenue Range
  7. Audience
  8. Audience Segment
  9. Website
  10. City
  11. State
  12. Country Name

For details on each firmographic attribute, see Reference: Firmographic Attributes Overview for Demandbase One.

Tip: You can also add account-level Demandbase fields that you want to collect data for, including Salesforce account-level fields. To access Demandbase fields, go to Settings_N.png Settings > Analytics > Fields. For more information about Demandbase fields, see Understanding Fields

Step 4: Add the Selected Attributes to Account Connector

  1. In Demandbase, from the left navigation bar, go to Settings_N.png Settings > Demandbase-Wide Settings > Account Connector and click Google Analytics
    Account_Connector_N.png
  2. In the General tab, add or remove the attributes to capture.
    Add_Attributes_N.png
  3. In the Field Mapping tab, toggle Inactive/Active on to make the attributes active. Enter the GA Dimension Number if known.
    Toggle_Attributes_N.png
  4. Click Save and then click Activate to activate the integration.

Important:

  • Activating the integration only enables the selected attributes to return data as part of the API call from the Demandbase Tag. It does not pass data to GA until the integration setup is complete.
  • If you make changes in Account Connector after the initial setup, contact your CSM to update and reactivate the integration. The integration Status remains as Processing until Demandbase completes the process.

Step 5: Grant Demandbase Access to GA

Set up Demandbase with edit access to your GA4 property using demandbase.analytics17@gmail.com. If no access can be granted, you’ll need to complete Step 6 on your own.

Important: After granting Demandbase access, contact your Demandbase Account Team to complete the integration setup and to validate data flow between Demandbase and GA.

Step 6: Set Up Custom Dimensions

In GA, set up Custom Dimensions to match your Account Connector mapping for Google Analytics in Demandbase.

  1. Sign in to GA and navigate to the appropriate GA4 Property.
  2. Click the Configure icon in the left menu and click Custom definitions.
    Custom_Dimensions.png
  3. Click Create custom dimensions. Create a custom dimension for each Demandbase attribute selected in Step 4.
    New_Custom_Dimension.png
    In the New custom dimension window, enter the following:
    • Dimension Name: Enter a name for the dimension to reference the Demandbase attribute. For example, Demandbase - Company Name.
    • Description: (Optional) Enter a description to add more details for the dimension.
    • Scope: Select Event for all dimensions.
    • Event Parameter: This is the most important field when you create custom dimensions. Enter a name to be used to complete the integration in GTM. We recommend adding demandbase or db to the event parameter name. For example, enter the following for attributes recommended in Step 3.
      • demandbase_sid
      • demandbase_company_name
      • demandbase_industry
      • demandbase_sub_industry
      • demandbase_employee_range
      • demandbase_revenue_range
      • demandbase_audience
      • demandbase_audience_segment
      • demandbase_website
      • demandbase_city
      • demandbase_state
      • demandbase_country_name

Step 7:  Set Up GTM Variables

  1. Sign in to GTM and navigate to the GTM container with the GA4 property setup.
  2. In the Workspace, select Variables from the left menu.
  3. Create a new variable for each Demandbase attribute selected in Step 4.
    Variable_Config.png
    In the Variable Configuration window, enter the following:
    • Name: Enter a variable name at the top of the page.
    • Variable Type: Select Data Layer Variable.
    • Data Layer Version: Select Version 2 with a default value of Non-Company Visitor.
    • Data Layer Variable Name: Each variable requires a specific name from the Demandbase API response. Enter the following for the Demandbase attributes recommended in Step 3.
      • demandbase_sid
      • company_name
      • industry
      • sub_industry
      • employee_range
      • revenue_range
      • audience
      • audience_segment
      • web_site
      • city
      • state
      • country_name
        Tip: For the data variable names to use with other firmographic attributes, see the API Variable Names in the table in Reference: Firmographic Attributes Overview for Demandbase One.

Step 8: Create a New GA4 Event

  1. In the GTM container, select Tags from the left menu.
  2. Create a new tag with the name Demandbase GA4 Event and select the Google Analytics: GA4 Event tag type.
    Tag_Type.png
  3. In the Tag Configuration window, enter the following.
    Tag_Config.png
    • Configuration Tag: Add the GA4 property that Demandbase will send data to.
    • Event Name: Select Demandbase_Event.
    • Event Parameters: Add a row for each GTM variable created for Demandbase attributes in Step 7.
      • In the Parameter Name field, enter the event parameter name for each custom dimension created for Demandbase attributes in Step 6. The names entered must match the event parameter name.
      • In the Value field, click the plus icon and select the corresponding GTM variable created for each Demandbase attribute in Step 7.

Step 9: Update the Demandbase GA4 Event Trigger

For the Demandbase GA4 Event tag created in Step 8, update the trigger to ensure that Demandbase data is available before firing the GA4 event.

  1. In the Demandbase GA4 Event tag, create a new trigger with the name Demandbase_Loaded and select the Custom Event trigger type.Trigger_Config.png
  2. In the Trigger Configuration window, enter the following:
    • Event name: Enter Demandbase_Loaded.
    • The trigger fires on: Select All Custom Events.

Was this article helpful?

2 out of 3 found this helpful