In this article, we will delve into the changes made within Real-Time Personalization (RTP) during the migration from Universal Analytics to Google Analytics 4. The content will primarily consist of a combination of links to other web articles that provide examples and step-by-step explanations where necessary. These resources will enhance the understanding of the topic and provide valuable insights.
This article aims to provide RTP customers with detailed steps for migrating configurations from Google Universal Analytics to Google Analytics 4. During this migration, you can expect to receive events either directly on the GA-4 Tag or through the GTM tag from our RTP application. The following sections will guide you through the migration process.
Before proceeding with the steps, it is important to determine which tag you are currently using on your website or landing page. You can do this by checking the active tag in the head section of your website's source code. Here are the possible scenarios:
Universal Analytics: If you find a Universal Analytics tag (e.g., analytics.js) in the head section, it means you are using Universal Analytics.
GA-4 Tag: If you find a GA-4 tag (e.g., gtag.js) in the head section, it indicates that you are using GA-4 directly.
GTM Tag connected to GA-4: If you find a Google Tag Manager (GTM) tag in the head section, it means you are using GTM, which is connected to a GA-4 tag.
Once you have identified which tag you are using, you can proceed with the corresponding steps for migration.
If you have implemented Google Tag Manager (GTM) on your website, you can identify the GA-4 tag by finding a snippet in the head section of your site's source code. The tag will be in the format of (GTM-XXXXXXXXXX).
<!-- Google Tag Manager --> <script>( function (w,d,s,l,i){w[l]=w[l]||[];w[l].push({ 'gtm.start' : new Date().getTime(),event: 'gtm.js' }); var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!= 'dataLayer' ? '&l=' +l: '' ;j.async= true ;j.src= 'https://www.googletagmanager.com/gtm.js?id=' +i+dl;f.parentNode.insertBefore(j,f); })(window,document, 'script' , 'dataLayer' , 'GTM-XXXXXXX' );</script> <!-- End Google Tag Manager --> |
If you are exclusively using a GA-4 tag without any additional configurations, the snippet on your website will resemble the following example, with the tag appearing as (G-XXXXXXXXXX).
<!-- Google tag (gtag.js) --> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag( 'js' , new Date()); gtag( 'config' , 'G-XKZV8T8FFN' ); </script> |
If you are solely relying on the GA-4 tag and not utilizing GTM, the following instructions will guide you on tracking events with Custom Dimensions,
Step 1: To access the Custom Definitions for your GA-4 property in Google Analytics, follow these steps:
By configuring the Custom Definitions, you can define and track custom parameters that are relevant to your analytics needs. This allows you to gather more specific and tailored data from your events.
Step 2: Before setting up the variables, please ensure that you create the Custom Definitions based on the dimensions configured within the RTP UI. To verify the event being sent from RTP to GA, refer to the information provided below:
RTP UI navigation: Account Settings → Domain → Google Universal Analytics
gtag( "event" , "RTP_GA_VISITOR_DATA" , { dimension1: "Adobe Systems Incorporated" , dimension2: "Marketing" , dimension3: "Fortune500" , dimension4: "Elite" , dimension5: "2023R2_Test" }) |
For example, the dimension1 corresponds to the Organization Index and will be displayed as RTP_Organization in your Google Analytics Dashboard. You can choose any name for the dimension that makes sense to you in this case.
Step 3: The processing time for these Custom Dimensions by Google typically takes around 24 hours. After this period, you will be able to view and utilize them in your reports for filtering and other purposes.
In the meantime, you can verify if the events are being successfully sent to your Google Analytics dashboard by following these steps:
Additionally, if you scroll down on the same screen, you will find the Custom Definitions you have configured, which can be utilized as filters (as shown in the second picture below).
Please note that in addition to the RTP_GA_VISITOR_DATA event, we also send two other events: Matched Segments and Campaigns. These events do not require Custom Dimensions and can be viewed in your reports in the same manner as the RTP_GA_VISITOR_DATA event. The event names for Matched Segments, Campaigns, and Remarketing are RTP-Segments, RTP-Campaigns, and RTP-Remarketing, respectively. However, please note that these events will only be sent if certain conditions are met on RTP's end.
If you are utilizing a GTM (Google Tag Manager) Tag and want to track events with Custom Dimensions, you can follow the steps outlined below,
When sending data to the GTM (Google Tag Manager) Tag using the dataLayer.push()
method, the data format will be structured as follows:
dataLayer.push({ event: "RTP_GA_VISITOR_DATA" , dimensionData: { dimension1: "Adobe Systems Incorporated" , dimension2: "Marketing" , dimension3: "Fortune500" , dimension4: "Elite" , dimension5: "2023R2_Test" } }) |
In this format, the dimensions are encapsulated within the nested object dimensionData
. To access each dimension, you can refer to them using the dimensionData
object, such as dimensionData.dimension1
for dimension1
and its corresponding value.
By utilizing this format and correctly populating the dimensions within the dimensionData
object, you can effectively send the data to the GTM Tag and have the Custom Dimensions captured for further processing and analysis.
Step 1: Navigate to your Google Tag Manager account and locate the Container ID, which corresponds to the unique identifier for your GTM tag. Once you have identified the Container ID, follow these steps:
By accessing the Workspace associated with your Container ID, you can make changes, update configurations, and deploy various tags to your website or application.
Step 2: Within the Workspace, navigate to the left pane and select "Triggers". Follow these steps to set up a Trigger of type "Custom Event" with the Event Name as "RTP_GA_VISITOR_DATA":
By setting up this Trigger with the specified Event Name, you are instructing Google Tag Manager to listen for the "RTP_GA_VISITOR_DATA" event and perform any associated actions or tags when this event occurs.
Step 3: In the Google Tag Manager interface, follow these steps to set up custom variables under User-Defined Variables, which correspond to the dimensions set up inside RTP UI:
By setting up these custom variables as data layer variables, you are instructing Google Tag Manager to retrieve the corresponding values from the data layer, specifically from the specified dimension within the nested object. This allows you to use these variables in your tags, triggers, or other configurations within Google Tag Manager.
Step 4: Similarly, you need to create five User-Defined Variables in Google Tag Manager with appropriate names of your choice. In this example, we have used the naming convention Dimension1, Dimension2, and so on. Once created, the User-Defined Variables will appear as follows:
dimensionData.dimension1
dimensionData.dimension2
dimensionData.dimension3
dimensionData.dimension4
dimensionData.dimension5
Ensure that the Variable Names match the nested object structure and dimensions being sent from RTP. These User-Defined Variables will capture the corresponding dimension values from the data layer and make them available for use in tags, triggers, or other configurations within Google Tag Manager.
Step 5: Now, let's proceed to the "Tags" section in Google Tag Manager. Follow the steps below to create an event tag with the appropriate configuration:
Note: Make sure to adjust the parameter names and dimensions according to your specific setup.
By following these steps, the GA4 Event tag will be set up in Google Tag Manager to capture the custom event data and send it to your GA-4 property in the desired format.
Step 6: In some cases, changes made in Google Tag Manager may take some time to propagate and reflect accurately. If you encounter any delays or issues with the newly created tag, you can try pausing and then resuming the tag after a short waiting period. Follow the steps below:
By pausing and then resuming the tag, you give it a chance to refresh and align with any updates made in the Google Tag Manager configuration. This can help ensure that the tag functions correctly and captures the desired event data.
Note: The actual waiting time may vary, so it's recommended to observe the changes and verify if the desired data is being captured before resuming the tag.
Step 7: Now, you can proceed to the preview screen in Google Tag Manager to debug your landing page or web page that contains both the RTP tag and the GTM tag. When you enable the preview mode, you will be able to observe and analyze the tag firing and data being sent. Here is an example of what you may see during the debugging process:
The preview and debug mode in Google Tag Manager provide valuable insights into how the tags are functioning on your landing page or web page. It allows you to validate the data being sent, verify the correct firing of events, and ensure that the custom dimensions and mappings are working as intended.
Step 8: Now, access your Analytics Admin screen and navigate to your GA4 property. Look for the Debug view within your property settings. In the Debug view, you will be able to observe the incoming events, including the event named "RTP_Organization" as configured in step 5 (refer to the second image).
The debug view in Google Analytics allows you to inspect the events received by your GA4 property and ensure that they align with your configurations. It helps you validate the implementation of custom dimensions, track the data being sent from RTP, and ensure that the events are being captured accurately in your GA4 reports.
Step 9: Additionally, you can also view the values of the custom dimensions in the Reports section of Google Analytics. Navigate to the "Events" section, where you can find the event named "RTP_Organization" that corresponds to the custom dimensions configured.
By accessing the Reports section in Google Analytics and exploring the Events category, you can review the data associated with the "RTP_Organization" event and ensure that the custom dimension values are captured accurately. This allows you to analyze and filter the event data based on the custom dimensions in your reports.
At this stage, regardless of whether you are using GA4 directly or integrated with GTM with RTP, you should start seeing the data related to RTP assets and events populated in your Google Analytics dashboards. This includes the custom dimensions, events, and other relevant information that you have configured.
If you encounter any issues or have concerns during the migration process, I recommend reaching out to the Marketo support team for assistance. They will be able to provide you with further guidance and help resolve any issues you may face.
Remember that successfully migrating and tracking data in GA4 is crucial for accurate reporting and analysis, so don't hesitate to seek support if needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.