0
votes

This is my first custom dimension and when I try to use it in my Analytics custom report it says: There is no data for this view.

I created a custom dimension in GA property which gave me 1 as index

I created 2 variables in Google Tag Manager:

{{Analytics Settings}} variable with UA tracking number and I set custom dimension index to 1 and value to: Client ID

{{Set Client ID in Dimension 1}} variable with custom JavaScript

function() {
    var customDimensionIndex = 1;
  return function(model) {
    model.set('dimension' + customDimensionIndex, model.get('clientId'));
  }
}

Then I created a Universal Analytics Tag with:

Track type: PageView

Google analytics settings: {{Analytics Settings}}

Override: ticked

Field Name: customTask

Value: {{Set Client ID in Dimension 1}}

Triggering: All Pages

Then I also set up a trigger for the container: Page View

Am I missing a setting somewhere?

1
What you mean with 'and I set custom dimension index to 1 and value to: Client ID'? You don't need it, just customTask - Michele Pisani
Okay I removed the Google Analytics variable completely from the tag. This still gives me the same result though. - Pieter le Roux
You can follow this guideline: simoahava.com/gtm-tips/… - Michele Pisani
It's also not working, I even created the field cookieDomain as the guideline's image shows with value set to auto. I only have these settings now: It's a Universal Analytics Tag with: Track type: PageView Override: ticked Field Name: customTask Value: {{Set Client ID in Dimension 1}} Triggering: All Pages - Pieter le Roux
Try to configure customTask in Analytics settings (removing it from override). What you see in preview? - Michele Pisani

1 Answers