Skip to main content
All Collectionsaiva - AI Voucher & e-Gift Solution
Measure activity using Google Analytics
Measure activity using Google Analytics

Measure activity as your customer journeys span across your website and aiva hosted voucher and eGifting page.

Andy Dharmani avatar
Written by Andy Dharmani
Updated over a year ago

Why implement cross-domain measurement

When using aiva, you will pass the customer from your website to the webpage hosted by aiva. As your website and aiva are on a different domain, Google Analytics (GA) Cross-domain measurement needs to be enabled. Google tags provide a common way to measure activity as your customer journeys span across your and aiva hosted page.

Without cross-domain measurement, a user who arrives to your website and then proceeds to aiva is counted as two separate users, with two separate sessions of different durations. With cross-domain measurement, activity is captured as a single user.

How it works

You will share the first-party measurement cookies between your domain and aiva domain. The first-party measurement cookies are stored in a web browser, and can only be accessed by pages on the same domain.

Setup for cross-domain measurement is a two-step process:

  1. Your domain decorates URLs that point to the aiva domain so that they contain the first-party measurement cookie values of the source domain.

  2. aiva domain checks for the presence of linked measurement cookies.

Cross-domain measurement with Google tags will add a linker parameter to URLs that point to the aiva domain. The linker parameter is identified in URL query parameters with the key _gl. Example below:

https://vouchers.getaiva.com/vhp?gid=f49d1df2-f9b3-416e-a366-adf7ef6e7c63&iid=9c6690ed-bfe0-4fc1-91f7-a0e115999059&_gl=1~abcde5~

On the aiva domain, tags are configured to check for linker parameters in the URL. If a valid linker parameter is found, the tag extracts the first-party measurement cookie and stores it.

Set up cross-domain linking for GA4

To set up cross-domain measurement on your domain, you need to create a linker object. The linker will listen for clicks on links that point to the aiva domain, and it will automatically append a linker parameter to the aiva URL.

Under your Google Analytics 4 (https://analytics.google.com/, follow the steps:

  1. In Admin, under Data collection and modification, click Data streams.

  2. Click Web, then click a web data stream.

  3. In the web stream details, click Configure tag settings (at the bottom).

  4. In the Settings section, click Configure your domains.

  5. To manually add aiva domain, click Add condition under Include domains that match the following conditions:

    • Choose a match type.

    • Under Domain, enter the identifier for the aiva domain you want to match (i.e. vouchers.getaiva.com). Make sure to select Match type as Begins with.

  6. Click Save.

Verify that cross-domain measurement is working properly

To verify cross-domain measurement works:

  1. Open a page of your site that contains a link to aiva.

  2. Click the link to navigate to the aiva vouchers page.

  3. Verify that the page loads correctly.

  4. Verify that the URL in the aiva domain contains the linker parameter _gl. For example: https://vouchers.getaiva.com/vhp?gid=f49d1df2-f9b3-416e-a366-adf7ef6e7c63&iid=9c6690ed-bfe0-4fc1-91f7-a0e115999059&_gl=1~abcde5~. Try in the Incognito tab if does not show.

Set up cross-domain linking for legacy Universal Analytics tags

To configure a legacy Universal Analytics tag in Tag Manager to measure user interaction across multiple domains, follow the steps mentioned on this page https://support.google.com/tagmanager/answer/6107124.

Did this answer your question?