Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Dimension tracked in GTM, but not showing in UA

I tried to setup Google Tag Manager. The Pageviews are tracked correctly, but in Universal Analytics I can not see Custom Dimensions.

In Google Universal Analytics:

I have defined some custom dimensions in the Universal Analytics Profile under "Admin" -> "Custom Definitions" -> "Custom Dimensions".

The following Dimensions are relevant:

(Name)                   (Index)
PageView Author          7
PageView Themenwelt      8
PageView Seitentyp       9
PageView Posttyp         10
PageView Modified Date   11

In Google Tag Manager:

I have added a page Universal Analytics Tag with Track Type "Page View" and the following settings for "Custom Dimensions":

(Index)                  (Dimension)
7                        {{Tracking Variable Posttyp}}
9                        {{Tracking Variable Seitentyp}}
8                        {{Tracking Variable Themenwelt}}
7                        {{Tracking Variable Autor}}
11                       {{Tracking Variable Modified Date}}

The values for the dimensions are fetched via Macros, using the "Javascript Variable" Macro. Example for such a macro is just:

Global Variable Name: window.analytics_tracking_params.Author

The Variable is defined in the Website content, before the tag manager code.

When I go to the debug mode of tag manager, I can see the event being triggered, with the following debug entry for "Dimension":

{
   7: Tracking Variable Autor,
   8: Tracking Variable Themenwelt,
   9: Tracking Variable Seitentyp,
   10: Tracking Variable Posttyp,
   11: Tracking Variable Modified Date,
}

The Macros resolve correctly to the values set on the website.

----------> I believe that the Google Tag Manager Setup is correct.

Again, in Google Universal Analytics:

I have created a Custom Report ("Customization" -> "+New Custom Report") with the following settings:

Metric Groups:  Pageviews (Users)

Dimension Drilldowns: PageView Posttyp (Custom Dimensions)

In the report table below the Chart, there is only this message "There is no data for this view.". This happens regardless of which Custom Dimension I chose.

----------> I believe that the Settings in Google Universal Analytics are correct, but apparently something does not work as expected.

It seems the Data is not correctly sent to Universal Analytics OR Universal Analytics is not able to process the Data and display it. Is there anything I might have forgotten or misunderstood?

like image 232
para Avatar asked Sep 12 '14 08:09

para


Video Answer


1 Answers

I encountered a similar problem with my GTM configuration. I had my macro retrieving the values for my custom dimensions set up to fill in an empty string as a default value (see checkbox for default value: "To set the default value to be an empty string, select this option and leave the text field blank.").

Unfortunately my custom dimension was overwritten at some places with the empty string, so in GA pagehits etc. were recorded but the custom dimensions have been set to blank.

I changed that with unchecking the default value box, so instead of a empty string a nil value (or in JS: undefined) will be used instead. With that setting my custom dimension haven't got overwritten again with empty strings.

Maybe that might fix your problem as well?

like image 187
Thunder Storm Avatar answered Sep 22 '22 03:09

Thunder Storm