Our 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 the app. You can segment Sessions and Session Replays, Heatmaps, Forms and much more.
To enable the data connection, begin in Google Analytics and navigate to Admin along the header. In the Property column, select Custom Dimensions.
Click New Custom Dimension.
Add a name and ensure you select Session from the Scope drop-down menu and ensure the Active checkbox is ticked. Now click Create.
You will now see the Custom Dimension in the list. Be aware of the Index of this, as you will need it in DXA.
In DXA, navigate to Connect > Configure Data Connectors > Analytics > Google Analytics. Click Google Analytics Integration Enabled and then Grant Access. You may need to disable ad-blocker to ensure this dialog box appears.
A dialog box will appear asking you to grant access to your Google account, click Accept.
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 drop down menu. Dimension/Custom variable No is the index of the custom dimension that was created earlier.
Once happy with your data connection settings, click Save. DXA runs nightly checks for Google Analytics connection data, so upon enabling the data connection, you will need to wait up to 24 hours for your segments and relevant data to come through.
Once the implementation has been setup, you can begin to use your Segments in DXA. See below for further information regarding using Google Analytics segments.
Viewing DXA Session Replays from Google Analytics
To view DXA Session Replays from within Google Analytics, simply create a 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 dimension. You will need to have the DXA Heatmap Helper Extension installed, and once it is, 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.