Context
The Demandbase Tag sends Company Profile Attributes to Custom Dimensions in Google Analytics 4 (GA4), enhancing B2B web traffic insights.
There are two ways to integrate Demandbase with GA4. This article covers the simpler method, which sends data through a Demandbase custom event. While easier to set up, it offers limited reporting, showing only account visits and frequency without linking Demandbase data to other GA4 custom events.
The recommended method sends Demandbase custom dimensions through the GA4 page view event as user parameters. This method provides deeper insights for custom reporting in GA4. See Integrate Google Analytics 4 and Demandbase Using the Page View Event.
Prerequisite/Preparation
You must have Google Analytics 4 Admin permissions.
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 ensure you are using GA4 and GTM.
Step 3: Select the Demandbase Attributes to Capture
Demandbase has over 40 firmographic attributes you can use. See Reference: Firmographic Attributes Overview for Demandbase IP-API v3 (Updated Version).
Important: In GA4, the free version allows up to 25 event parameters (attributes). The paid version allows up to 100 event parameters. See Google's article [GA4] Event collection limits.
By default, Demandbase automatically adds the following 12 attributes:
Important: These attributes cannot be removed.
- Company ID
- Company Name
- Website
- Industry
- Sub Industry
- Employee Band
- Revenue Band
- Audience
- Audience Segment
- City
- State
- Country Name
Tip: You can also add account-level Demandbase fields, including CRM account-level fields. To access Demandbase fields, go to Settings > Analytics > Fields. See Understanding Fields.
Step 4: Add GA4 Integration in Demandbase Account Connector
-
In Demandbase, from the left navigation bar, go to
Settings > Demandbase-Wide Settings > Account Connector, and click Create New Integration.
- From the Integration Name drop-down list, select Google Analytics 4.
- Click Create.
- Enter your Google Measurement ID and click Next. See the Google documentation for information about your measurement ID.
- A Demandbase team member reviews the integration, then sends you an email notification upon approval. Once approved, go to Step 5.
Step 5: Edit Attributes in Demandbase Account Connector
- Click upper right three dots > Edit.
- In the Field Configuration table, add or remove attributes.
- To add an attribute, click Add Field at the bottom of the table. Under Select Field, select an attribute.
- To remove an attribute you added, hover over the field name, click the gear icon that appears, and click Delete Field.
Important: You cannot remove the 12 attributes automatically added by Demandbase.
- Click Activate.
Step 6: Set Up Custom Dimensions in GA4
In GA4, set up Custom Dimensions to match your attributes in Demandbase.
- In GA4, go to the desired GA4 Property.
-
From the left navigation bar, go to Configure > Custom definitions, and click Create custom dimensions.
-
Create a custom dimension for each Demandbase attribute from Step 5.
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 details for the dimension.
- Scope: Event.
-
Event Parameter: The Event Parameter field is critical when creating custom dimensions. The recommended names for each attribute are as follows:
- demandbase_company_id
- demandbase_company_name
- demandbase_website
- demandbase_industry
- demandbase_sub_industry
- demandbase_employee_range
- demandbase_revenue_range
- demandbase_audience
- demandbase_audience_segment
- demandbase_city
- demandbase_state
- demandbase_country_name
Step 7: Set Up Variables in GTM
- In GTM, navigate to the GTM container with the GA4 property setup.
- From the left navigation bar, select Variables.
-
Create a new variable for each Demandbase attribute from Step 5.
Enter the following:- Name: Enter a variable name.
- Variable Type: Data Layer Variable.
- Data Layer Version: 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:
- company_id
- company_name
- web_site
- industry
- sub_industry
- employee_range
- revenue_range
- audience
- audience_segment
- city
- state
- country_name
Tip: For data layer variable names to use with other firmographic attributes, see the Data Layer Variable Name column for each attribute in Demandbase Account Connector (Step 5).
Step 8: Create New Event in GTM
- In GTM, from the left navigation bar, select Tags.
- Create a new tag with the name Demandbase GA4 Event.
- Under Choose tag type, select Google Analytics: GA4 Event.
-
Enter the following:
- Configuration Tag: Add the desired GA4 property.
- Event Name: Demandbase_Event.
-
Event Parameters:
- Parameter Name: Enter a name for the dimension to reference the Demandbase attribute. Ensure the values entered match the values used in Step 6.
-
Value: Click the plus icon and select the corresponding GTM variable created for each Demandbase attribute.
Step 8: Update Google Tag Trigger in GTM
You need to update the Google Tag trigger to ensure Demandbase data is available before the GA4 custom event fires.
- Create a new trigger, and under Trigger Type, select Custom Event.
-
Enter the following:
- Event name: Demandbase_Loaded.
- The trigger fires on: All Custom Events.
- Click Save.