Set Up Google Analytics Event Tracking for Site Customization

  • Updated

Context

To get additional attributes within Google Analytics (GA) for your site visitors to your customized site experiences, send events to GA through Site Customization. You can pivot on additional primary dimensions or add secondary dimensions such as Company Name as you would in standard reporting from GA.

Prerequisites/Preparation

Steps: Create a New Tracking Event

  1. From the left navigation bar, go to Personalization_N.png Personalization > Site Customization.
  2. Click the Tracking tab and click Create a new tracking event.
    Tip: To convert existing Google Analytics tracking events to Google Analytics 4 (GA4) tracking events, see Steps: Convert a Tracking Event.
  3. Enter the Event name, Html selector, Event type, Parameter, and Parameter value.
    Tip: To add additional parameters for an event, click Add parameter. You can add up to 25 parameters for an event.
    GA
    Use the following event hierarchy for all messaging with personalization:
    1. Event Name
    2. Event Type
    3. Parameter
    4. Parameter Value

Steps: Convert a Tracking Event

If you have existing Google Analytics tracking events configured, you can convert them to new GA4 tracking events. When you convert a tracking event, Demandbase maps the following fields from your existing tracking event to the new GA4 tracking event.

Existing Tracking Event Field New Tracking Event Field
Event label Event name
Element selector Html selector
Event type Event type
  1. From the left navigation bar, go to Personalization Personalization > Site Customization.
  2. Click the Tracking tab and click Convert tracking to GA4.
    GA
    Demandbase pre-populates the Event name, Html selector, and Event type fields using the values from the existing tracking event.
  3. Enter the Parameter and Parameter Value for the new tracking event.
    Tip: To add additional parameters for an event, click Add parameter. You can add up to 25 parameters for an event.
    GA
    Use the following event hierarchy for all messaging with personalization:
    1. Event Name
    2. Event Type
    3. Parameter
    4. Parameter Value

Event Hierarchy

An overview of the event hierarchy for messaging within personalization is provided in the following sections. For more information, see the Google Analytics documentation about events.

Event Name

A name that you select to group parameters that you want to track. Typically, you will use the same event name multiple times over related UI elements that you want to group.

Example: Homepage_Auto

Html Selector

Copy and paste the element id from the Visual tab on the Site Customization > Experience builder.
HTML.png

Event Type

You can choose between two types of events:

  • View: If an experience is viewed, this will trigger a tracked event into GA. We recommend adding this event type for every experience.
  • Click: This option can be used when personalizing a click event such as a CTA button. Once selected, you will need to add the html id for the element you are personalizing, which you can see on the Advanced tab of the Experience Builder in Demandbase.

TipThe Event Type you set in the platform will not display as a metric or value in GA.

Parameter

A name that you select for the event parameter you want to track. You can add up to 25 parameters for an event.

Example: page_location (page URL)

Parameter Value

A value that you select for the event parameter you want to track. 

Example: Click CTA Button

Tip: Event Name, Event Type, Parameter, and Parameter Value are optional in terms of what you would like to use. These are field names that GA will pick up once fired, and allow you to pivot on.

Outcome

To see the Events Report in GA, select Reports in the left menu and go to Engagement > Events.

GA

You will see results for all of your Event fields in the Event Name column.

From here, you can pivot on these primary dimensions or add secondary dimensions such as Company Name as you would in standard reporting from GA.

You will also see a Demandbase API call but this is not the event tracking, it is a standard API call class="s3".

GA will not immediately reflect event data in the Events report. Typically the overview will reflect data first, and the more detailed information will follow in additional view options after it's been processed by GA.

Was this article helpful?

1 out of 1 found this helpful