You can configure your Google Analytics integration for each dataset you have in Evergage without having to modify the customized JavaScript available in SETTINGS > Site-Wide JavaScript. This article will detail the instructions for doing this and is intended for individuals who have a deep understanding of the Google Analytics platform and features as well as event executions.

Before enabling the integration through the Third Party Products editor, ensure that any Google Analytics tracking code within your dataset's Site-Wide JavaScript has been removed or disabled. Please contact Evergage Support for assistance completing this action.

Enable the Integration

Traditionally, the Evergage integration with Google Analytics was configured in a way that tracked all page load/action and campaign stat events. Today, Evergage allows users to specifically choose which types of events to track. By default neither action events or campaign events (impressions, clickthroughs or dismissals) are configured to be sent.

Send Evergage Actions

Category - represents the "eventCategory" of a GA event, generally the value is simply "Evergage"

Page Load Actions - value used as "eventAction" when the Evergage action is a page load, or page view

Page Actions - value used as "eventAction" when the Evergage action is a click mapped with the Visual Editor

Label - value used as the "eventLabel"

NOTE

You can use any of the following values in the Label field:

${campaignName}

${campaignId}

${experienceName}

${experienceId}

${actionName}

${currentDate}

Send Evergage Campaign Events

With our previous integration methods, any campaign impression, clickthrough or dismissal event would have had a simultaneous GA event tracked. Today you can choose to either track all campaigns by default, or you can choose "Specific Campaigns" and enable campaign tracking on a per-campaign basis. If "Specific Campaigns" is selected, you will need to enable tracking on each individual campaign you wish to have GA events sent for, refer to Customizing Events for Specific Campaigns for additional instructions.

Select the Campaign Events tab

Select Send GA events for campaign events

Select either All Campaigns or Specific Campaigns

Complete options for Campaign Events:

Category - the "eventCategory" of a GA event, generally defaulted to "Evergage"

Stat Type Impression - the "eventAction" when the campaign event is an Impression

Stat Type Clickthrough - the "eventAction" when the campaign event is a clickthrough

Stat Type Dismissal - the "eventAction" when the campaign event is a dismissal

Label - the "eventLabel" for any campaign events, generally defaulted to the campaign name and experience name

Configure Tracking ID (if applicable)

If the beacon is integrated into your site synchronously and is included as a script tag before Google Analytics is fully initialized, you can provide the Tracking ID for your Google Analytics tracking object and Evergage will store events that are tracked before GA is initialized. Once a tracking object for the given ID has been created, Evergage will send any of the stored events.

For more information on how to configure the Tracking ID or for help finding your Tracking ID, see the official documentation from Google.

Customize Events for Specific Campaigns

In some cases you may want to alter the way an event is populated for specific campaigns. You can configure event property formats at the campaign level for each campaign in your Evergage dataset.

Options for Campaign Overrides

Category: Represents the "eventCategory" of a GA event, generally defaulted to "Evergage"

Stat Type Impression: Represents the "eventAction" when the campaign event is an Impression

NOTE

This field will only accept a dynamic syntax variable of ${userGroup} which will be replaced by the userGroup of the impression. If the impression is not a controlled impression, userGroup will be replaced by "test". Alternatively, if the impression is a controlled impression, userGroup will be replaced by "control".

Stat Type Clickthrough: Represents the "eventAction" when the campaign event is a clickthrough

Stat Type Dismissal: Represents the "eventAction" when the campaign event is a dismissal

Label: Represents the "eventLabel" for any campaign events, generally defaulted to the campaign name and experience name

Set Custom Dimensions or Metrics

For each campaign, you can set a custom dimension or metric with campaign or experience information. Custom buckets will only be populated for campaign impression events.

Log into Evergage and open a campaign

Select SETUP

Select GOOGLE ANALYTICS

Select Set a custom dimension or metric

Select Dimension or Metric

Enter the Dimension Index or Metric Index

Enter the Dimension Value or Metric Value

Close SETUP and click Save to save the campaign

Event Properties Dynamic Syntax

A powerful component of the Google Analytics integration with Evergage is the dynamic population of event properties (Category, Action, Label) with the campaign name, ID, or experience name and ID. Additionally, you can assign the name of mapped action events to event labels.

Outlined below are the dynamic variables available for use within configuration fields.

Campaign Label or Event Category

${campaignName} - Will be replaced with the full campaign name for the stat event

${campaignId} - Will be replaced with the campaign ID for the stat event

${experienceName} - Will be replaced with the full experience name for the stat event

${experienceId} - Will be replaced with the experience ID for the stat event

${currentDate} - Will be replaced with the current full date formatted as: yyyymmdd (e.g. 20160801)

Event Label for Actions Only

${actionName} - For page load or page click action events, this variable will be replaced with the Evergage action name

Campaign Stat Type

${userGroup} - When an A/B campaign is displayed to a user, this variable will be replaced with either "Test" or "Control" to represent the userGroup percentage split