Set Up Google Analytics 4 for Account ID Free Edition

  • Updated

Context

The Demandbase Tag sends company profile attributes to Custom Dimensions in Google Analytics 4 (GA4). A GA4 integration with Account ID Free Edition lets you take a deeper dive into the data using customized reports within Google Analytics (GA).

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 Account ID Free Edition integration with GA4 before July 2023.
  • If you previously set up the Account ID Free Edition integration with GA Universal Analytics, you can start the setup process at Step 2: Retrieve and Enter the GA Tracking ID.

Prerequisite

You must have Google Analytics Admin permissions to complete all steps.

Step 1: Generate and Deploy the Demandbase Tag

  1. Start the Account ID Free Edition setup wizard by clicking the link in the activation email that you received from Demandbase.
  2. In Step 1 of the setup wizard, generate the Demandbase Tag by entering your domain URL in the Website URL field. Copy and deploy the tag as described in Deploy the Demandbase Tag for Account ID.

Step 2: Retrieve and Enter the GA Tracking ID

  1. In GA, retrieve the Google tag ID (also referred to as Measurement ID) for the domain you want to use with Account ID Free Edition. See the Google documentation for information about Google tag IDs.
  2. In Step 2 of the setup wizard, enter the Google tag ID in the GA Tracking ID field. See the 
    Important: You can only enter one Google tag ID in the setup wizard. The Google tag ID is an identifier to direct the Demandbase Tag to the property where you want the firmographic data sent.

Step 3: Set Up Custom Dimensions

In GA, set up Custom Dimensions for the Demandbase firmographic attributes you want to track. To set up Custom Dimensions, do the following:

  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 you want to track.
    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.
      Tip: We recommend adding demandbase or db to the event parameter name. For example, for the Company Name attribute, enter demandbase_company_name.

Step 4:  Set Up Google Tag Manager Variables

  1. Sign in to Google Tag Manager (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 you want to track.
    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. The name for the available Demandbase attributes are as follows:
      • company_name
      • web_site
      • industry
      • audience
      • company_size
      • revenue_range
      • hq_state
      • hq_country

Step 5: 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 4.
      • In the Parameter Name field, enter the event parameter name for each custom dimension created for Demandbase attributes in Step 3. 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 4.

Step 6: Update the Demandbase GA4 Event Trigger

For the Demandbase GA4 Event tag created in Step 5, 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.

Step 7: Enter the Event and Parameter Names

  1. In Step 3 of the setup wizard, enter the name of the event created in Step 5 in the Event name field.
  2. For each Demandbase attribute you want to track, enter the name of the event parameter created in Step 3 in the Parameter Name field.

Step 8: Check the Demandbase Tag

In the setup wizard, click the Demandbase tag checker button. After you select the Click here to check your tag button, the setup wizard informs you if the Demandbase Tag is successfully identifying web traffic. If the Demandbase tag checker generates an error message, see Validate the Demandbase Tag Transmits Data to help troubleshoot the issue.

Tip: After completing the setup process, go to your GA account to check for traffic and events to confirm data flow from the Demandbase Tag to GA4.