The integration with Google Analytics lets you view campaign results in Google Analytics. When integration is turned on, Google Analytics events are triggered when a user is served with a variation, allowing you to later create reports of users who triggered specific events (i.e. served with specific variations) in your Google Analytics reports.
If you are using visitor data privacy management, the data from any users who are opted-out using any method is not sent to Google Analytics.
Integrating with Google Analytics
- Go to Settings › Integrations and click Google Analytics.
- In the sidebar, click the Enable Integration slider.
- Select the Google Analytics Implementation type.
- The Universal and Classic refer to different versions of the Google Analytics script and are easier to configure. If you select one of these options, just click Save and your integration is complete. You can now skip to paragraph "Disabling the Integration for Individual Campaigns" below.
Note: the Universal and Classic integrations assume you have only one Google Analytics object on your site. If you have multiple objects on the same page or you have renamed your Google Analytics object, the integration will not work, as Dynamic Yield won't know which Google Analytics property to send the events to. In this case, utilize the Tag manager implementation type instead. - Tag Manager allows you to populate your dataLayer with campaign information which you can then use to trigger Google Analytics events via Tag Manager. To configure this type of integration continue with the next step.
- The Universal and Classic refer to different versions of the Google Analytics script and are easier to configure. If you select one of these options, just click Save and your integration is complete. You can now skip to paragraph "Disabling the Integration for Individual Campaigns" below.
- In the Data Layer Name field, enter “dataLayer” unless you modified the code Google Tag Manager provides.
- In the GTM Event Name field, enter "DY Event”. You can also enter a different name but it must match the event name you use in Google Tag Manager.
- In Google Tag Manager:
- If you have not created them already, create three variables of type Data Layer Variable. Name them eventCategory, eventAction, and eventLabel. Both the variable title and the data layer variable name should be the same. These variables will hold the information that will be sent as part of the integration.
- Create a trigger of type Custom Event. This trigger will send an event that will include the variables above. The event will have the name you specify, and the name should match the name you specified in the Dynamic Yield Integration settings (“DY Event”).
- Create a Tag that will connect the trigger and the variables you defined. Use the following settings:
- Set the Tag Type to Google Analytics – Universal Analytics
- Set the Track Type to Event
- For the Category, Action, and Label parameters, select the three variables you created.
- Leave the Value parameter empty
- Non-Interaction Hit should be True
- In Google Analytics Settings, select your settings variable
- Click the Triggering area and select the trigger you created.
- Click Save and Submit. Data should start flowing within a few minutes.
- If you have not created them already, create three variables of type Data Layer Variable. Name them eventCategory, eventAction, and eventLabel. Both the variable title and the data layer variable name should be the same. These variables will hold the information that will be sent as part of the integration.
Disabling the Integration for Individual Campaigns
Once the Google Analytics integration is enabled, data is sent about each of your campaigns. However, you can disable it for individual campaigns.
- When editing a campaign, click the edit icon
on the top section to edit the campaign settings.
- In the Advanced Settings, disable the Fire Google Analytics event toggle.
Note: If you are using the Universal or Classic implementation, events will be automatically sent based on the triggering settings of the campaigns. These are pre-configured to be non-interaction events.
Viewing Dynamic Yield Experience and Variation Data in Google Analytics
With the exception of Dynamic Links, Dynamic Yield experiences send information to Google Analytics as events.
- In Google Analytics, go to Behavior › Events › Overview.
- Search for events named as ‘DY Smart Action’ or ‘DY Smart Object’ under the Event Category. These two categories are based on legacy names for Dynamic Yield campaigns. They have reports on different types of campaigns that have enabled the integration in Dynamic Yield. Click on them to see more information.
- Click Event Action as the primary dimension to see details about campaigns. Click Event Label as the primary dimension to see details about each variation.
For Dynamic Links, events are not sent to Google Analytics. Instead, you can view data by searching for URL parameters in pageviews. The URL parameters will include an attribute called "medium" with the value "SmartLink".
This does not indicate the name of the Dynamic Link campaign. To view that, go to Acquisition › Source/Medium report in Google Analytics and use the "Medium" dimension.
Creating Reports in Google Analytics to View Dynamic Yield Data
You can also setup custom reports in Google Analytics account under ‘Customization’:
- Add a filter including: Event Category or Event Action, or Event Label and search for any DY event such as DY Smart Action:
- You can add metrics, as many as required such as ‘Bounce Rate’, or ‘Exit Rate’. This allows you to view the variation data breakdown in your Google Analytics account alongside with any additional metrics that you have included.
- You can also create segments with the condition of any Dynamic Yield event. This enables you to view and breakdown the data on the fly.
Data Discrepancies Between Dynamic Yield and Google Analytics
For various reasons, you may notice discrepancies between the metrics collected by Dynamic Yield and those collected by Google Analytics such as pageviews, users, and conversions. Most of the time, these discrepancies are due differences in the way the data is presented and do not represent actual discrepancies in the data. However, we recommend using the following procedures to make sure that there are no problems. Perform the following procedures until the data in Dynamic Yield is within 5% of the data in Google Analytics. If you cannot resolve the issue after performing these procedures, open a support ticket.
New User Calculation
Users are tracked differently in Dynamic Yield and Google Analytics, and this generally results in a higher number of new users in Google Analytics, but a more accurate number in Dynamic Yield.
In Google Analytics, users are tracked with cookies in their browser. If they delete their cookies, they will be seen as a new user.
In Dynamic Yield, users are tracked with cookies in their browser as well as local storage. Dynamic Yield will recognize them as returning users even if they delete their cookies.
Investigating General Data Discrepancies
- Open the Dynamic Yield Dashboard and look at the Site Performance metrics (users, purchases, conversions, etc.).
- Compare these metrics to the ones found in the Ecommerce and Audience overviews in Google Analytics.
Conversions › Ecommerce › Overview
Audience › Overview
The metrics should be within 5% of each other. If they are not, keep investigating by continuing with this procedure. - Make sure that the Google Analytics and Dynamic Yield scripts are implemented on the same pages. Sometimes a subdomain or subdirectory may have been overlooked.
- Make sure the two platforms are using the same IP filters. In Google Analytics, filtering is defined in “Views”. In Dynamic Yield, see IP Filters.
- Make sure the two platforms are using the same timezone. In Dynamic Yield, you can view your timezone by going to Settings › General Settings and clicking the edit button on next to the site name on the top of the page.
- If you notice greater discrepancies in Revenue vs. Purchase events, make sure that the event value for the Purchase events sent to Google Analytics and Dynamic Yield follows the same definitions (e.g. shipping, discounts).
- If there are still discrepancies that are greater than +/-5%, open a support ticket.
Investigating Experience and Variation Data Discrepancies
If all general data discrepancies have been resolved (see above), but you are seeing discrepancies in the data about individual experiences or variations, perform the following steps to investigate.
- In Dynamic Yield, select a campaign that is part of the integration and view it’s report. In the time range, select a version (current, or previous). Note the dates of the version as you will use the same time range in Google Analytics.
- In the Experience settings, look at the Variation Stickiness setting. If it is Sticky for the Session, compare the report to the equivalent Google Analytics report on sessions as follows:
- In Google Analytics, locate the report about the experience by going to Behavior › Events › Overview and searching in the DY Smart Action or DY Smart Object events.
- Search for events named ‘DY Smart Action’ or ‘DY Smart Object’ under the Event Category.
- If the Variation stickiness is Sticky for the User, compare the report to the equivalent Google Analytics report on users as follows:
- Create a segment in Google Analytics of users that triggered the event.
- Make sure the segment is filtered by users, not sessions.
- If there are still discrepancies that are greater than +/-5%, open a support ticket.