How to accurately track clicks from aggregator sites

Challenge

GoBear is an insurance policy and credit card research aggregator service. It is critical for GoBear to track the number of clicks directed to its partners’ websites. On the other hand, it is equally important for the partner (e.g. an insurance company or a credit card provider) to measure the number of inbound clicks from GoBear.

Gobear Search Results

 

When a user clicks on the “Go To Provider” button, GoBear tracks this as a “click out” on its end using event tracking. However, the partner also needs to keep track of the click that it receives using an equivalent metric.

“How can the partner track the inbound clicks from GoBear?”

The partner cannot rely on the number of sessions referred from GoBear because this will not be an equivalent comparison to GoBear’s clicks. If the user clicks multiple times within a short period of time, it will be seen as one session on the partner’s Google Analytics reports, but recognised as several clicks in GoBear’s reports. Also, not all clicks would be successfully directed to the partner site if users close their browser before the partner site loads.

Sparkline Solution

For tracking inbound traffic, the partner site can use a Custom Metric to track the number of inbound referrals from GoBear.

  1. Create a Custom Metric called “Lead Count” in Google Analytics (GA).
  2. Create a Constant variable to hold the GA index assigned to “Lead Count”.
  3. Create a Custom JavaScript variable called “CJS Lead Count” in Google Tag Manager (GTM). Depending on the Referrer variable, this will be set to 1 or 0.
  4. Set the “CJS Lead Count” in the GA Pageview tag along with its corresponding index.

Step 1:

Create a custom metric in Google Analytics following the steps in Google Help.

Step 2:

Create a Constant variable and set its value to the index of the Lead Count custom metric assigned in Google Analytics. Here, the index is assumed to be 2.

gobear_step2

Step 3.1:

In GTM, configure the “Referrer” built-in variable.

gobear_step3.1

For example, let us count the inbound traffic from “www.gobear.com/sg. The value of “Referrer” will contain “www.gobear.com”.

Step 3.2:

Create a Custom JavaScript variable with the condition to check if the referrer is the aggregator site (in our example, it is gobear.com) and set the counter value to 1 or 0 accordingly.

gobear_step 3.2

Code:


function() {
return {{Referrer}}.indexOf("gobear.com") > -1 ? 1 : 0;
}

Step 4:

Set this Custom JavaScript variable in the GA Pageview tag (reference: Google Help).

gobear_step4

Result:

As a result of this, the partner-site will be able to track the number of inbound referrals from its aggregator sites. For example:

gobear_result

This will allow them to better compare click out metrics reported by GoBear instead of trying to reconcile session numbers.