This integration enables you view campaign results in Google Analytics. When the integration is turned on, Google Analytics events are triggered when a user is served with a variation, enabling you to later create reports of users who triggered specific events (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.
- Universal, Classic, and Google Analytics 4 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 Disabling the Integration for Individual Campaigns.
Note: The Universal, Classic, and Google Analytics 4 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 won't work, as Dynamic Yield won't know which Google Analytics property to send the events to. In this case, use the Tag manager implementation type instead. - Tag Manager lets you to populate your data layer 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.
- Universal, Classic, and Google Analytics 4 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 Disabling the Integration for Individual Campaigns.
- 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 already done so, 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 hold the information that will be sent as part of the integration.
- Create a trigger of type Custom Event. This trigger sends an event that includes the variables from Step a. The event has the name you specify, which should match the name you specified in the Dynamic Yield Integration settings (“DY Event”).
- Create a Tag that to 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 already done so, 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 hold the information that will be sent as part of the integration.
Disabling the integration for individual campaigns
When 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 in the top section to edit the campaign settings.
- In Advanced Settings, disable the Fire Google Analytics event toggle.
Notes:
- If you are using a Universal, Classic, or Google Analytics 4 implementation, events are sent automatically based on the campaign trigger settings. These are preconfigured to be non-interaction events.
- If you've disabled Google Analytics scripts for users who opted out of Google Analytics cookies: We send the event, but it doesn't reach Google Analytics because the scripts on your site are blocked.
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 enabled in Dynamic Yield for the integration. Click 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.
Creating reports in Google Analytics to view Dynamic Yield data
You can also set up custom reports in Google Analytics account under ‘Customization’:
- Add a filter including: Event Category or Event Action, or Event Label and search for any Dynamic Yield 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 break down 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 to 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 ensure 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 recognizes 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, and so on).
- 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 be 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 time zone. In Dynamic Yield, you can view your time zone by going to Settings › General Settings and clicking the edit button next to the site name at 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 that Dynamic Yield follows the same definitions (for example, shipping or 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 still see discrepancies in the data about individual experiences or variations, do the following to investigate:
- In Dynamic Yield, select a campaign that is part of the integration and view its report. In the time range, select a version (current or previous). Note the dates of the version as must 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 who 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.
Troubleshooting: Why is my campaign data not showing up in Google Analytics?
If you’re not seeing any data for your campaigns in your Google Analytics reports, here are a few troubleshooting steps to confirm that the integration has been set up correctly.
Check whether Google Analytics is collecting any hits or events on your site
There are various tools you can use to check your Google Analytics implementation and verify what data is being collected. Here are two browser add-ons that can help you determine whether Dynamic Yield events are being collected successfully:
- GTM/GA Debugger
- Tag Assistant Legacy (by Google)
With the GTM/GA Debugger tool, you can record Google Analytics collection activity that occurs on the page and see where it is sent. You can also inspect the activity further to see additional details.
With the Tag Assistant Legacy tool, you can see information about what is being collected by Google Analytics, and review related hit and event data in your data layer.
Verify the Google Analytics implementation method on your site
There are several out-of-the-box Google Analytics integrations in Dynamic Yield. It’s important that you choose the correct one to ensure the implementation works as expected. Google Analytics Classic, Google Analytics Universal, and Google Analytics 4 are implementations based on the Google Analytics version. The Google Tag Manager triggers events based on information populated in the data layer (for more information, see the Integrating with Google Analytics section).
Tag Assistant Legacy and GTM/GA Debugger tools for this, as well.
Ensure the Google Analytics toggle is enabled for your campaigns
Check the campaigns that are not displaying data in Google Analytics and verify that the Fire Google Analytics events toggle is in the On position.
Ensure that the tag’s trigger matches the event name in Dynamic Yield (Google Tag Manager implementation only)
If you've implemented Google Analytics on your website through Google Tag Manager, it's important to verify that the Event Name set in the Dynamic Yield integration matches the name of the Custom Event Trigger in the Google Tag Manager tag. If they do not match, you might see the event in your data layer, but it will not trigger the tag in Google Tag Manager.
Event name in DY integration:
Custom event name in GTM trigger:
Review campaign events in your data layer (Google Tag Manager implementation only)
If you have implemented Google Analytics on your website through Google Tag Manager, it has probably been implemented alongside a data layer. Try monitoring the events and hits that are sent to your data layer. Make sure that the Dynamic Yield campaign events are being pushed to the data layer and are not being overwritten before they are collected by Google Analytics.
You can check your data layer by entering dataLayer in the console tab of your browser’s dev tools. You should see something similar to this image: