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

Steps

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.
3. Enter the Event category, Element selector, Event type, Event label, and Event action.
Tracking_Event.png
Use the following event hierarchy for all messaging with personalization:
1. 
Event Categories
2. 
Event Label
3.
Event Action

Event Category

A category is a name that you supply as a way to group objects that you want to track. Typically, you will use the same category name multiple times over related UI elements that you want to group under a given category.

  • Recommended naming convention: Demandbase – Personalization
  • For more information, see Google Analytics Help: About Events

Element Selector

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

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 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.

Event Label

Use labels to capture additional information for events that you want to track.

  • Recommended naming convention: [Experience Name]
    • By using the experience name for event label, it makes easier to filter within GA
  • For more information, see Google Analytics Help: About Events

Event Action

Use the action parameter to name the type of event or interaction you want to track for a particular web object.

  • Recommended naming convention:

View - [Page Name]

Click - [Button Name]

  •  For more information, see Google Analytics Help: About Events

Tip: Event Category, Event Label, and Event Action 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

Navigate to the events view in GA, on the left hand side and select Behavior. Under Behavior, use the Events drop-down to drill down by page and dimensions. 

 

 

You will see results for all of your Event fields in the Primary Dimensions area of Pages view in GA.

 

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 Pages view. 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?

0 out of 0 found this helpful