Google Analytics

The Google Analytics data connector allows you to pull through segments created in Google Analytics and use them in DXA in the same way you would use segments created in DXA. You can segment session replays, heatmaps, forms and other DXA features.

Setting up in Google Analytics

  1. On the Google Analytics navigation bar, go to Admin > Property > Custom Dimensions.Navigating to Custom Dimensions in Google Analytics

  2. Click + NEW CUSTOM DIMENSION.+ NEW CUSTOM DIMENSION button

  3. Add a name, select Session from the Scope dropdown menu, and ensure the Active checkbox is selected.Adding a new custom dimension

  4. Click Create.

The new custom dimension now appears in the list. Make a note of the Index number, as you will need this when setting up in DXA.New custom dimension appearing in the list with index number (highlighted)

Setting up in DXA

  1. On the DXA navigation bar, go to Connect > Data Connectors > Configure Data Connectors > Analytics > Google Analytics.Google Analytics data connector

  2. Click Google Analytics Integration Enabled.

    A button appears requesting access to your Google account.

    Grant access button

  3. Click Grant access.

    The Google Analytics data connector settings appear.Google Analytics data connector settings

  4. Select the Type of Google Analytics you use, either Universal Analytics or Google Analytics (Asynchronous).

  5. In Request Type, select one of the following options:

    • Default - Send an API request with each Session

    • Manual - Allows the implementation of custom API calls

  6. If you selected Universal Analytics and the global function name was changed from the default "ga", enter the Global function name.

  7. Tracker name is only required if the tracker name has been changed from its default. For Universal Analytics, the first available tracker will be used if no tracker name is provided. If the tracker name is unknown but stored in a JavaScript variable, this can be provided in the Tracker name variable field.

  8. Profile ID will automatically be filled out when granting access to your Google account, although if you have multiple, you can select the appropriate one for your property in the dropdown menu.

  9. In Dimension/Custom variable No, enter the index number of the custom dimension that was created earlier.

  10. Click Save.

The Google Analytics data connector is enabled. DXA runs nightly checks for Google Analytics connection data. So, upon enabling the data connector, you must wait up to 24 hours for your segments and relevant data to come through.

Once the implementation has been set up, you can begin to use your segments in DXA.
Note:

See Adobe Analytics and Google Analytics Segments for further information regarding using Google Analytics segments.

Viewing DXA session replays in Google Analytics

To view DXA session replays in Google Analytics, create a Google Analytics Custom Report that includes the same custom variable/dimension that you used to set up the data connection between Google Analytics and DXA when defining your dimensions.

You must have the DXA browser extension installed. Once installed, you will be able to see that all of the session IDs become links which, when clicked, will take you to the relevant session replay for that session.
Note: For more information, see Digital Experience Analytics Browser Extension.
Viewing session replays in Google Analytics