Joss
Joss

Reputation: 555

Custom reports are empty in Google Analytics receiving data from Google Tag Manager

I want to create a custom report with custom dimensions and custom metrics, so I've created them as admin in GA and both have index 1.

I've added them in the dataLayer in my code:

var dataLayer = {'dimension1':'Custom Dimension 1','metric1':123456}

And after setting in GTM, I've checked data is being sent right in live mode:

enter image description here

But custom reports are empty, but activity on site is being registered.

enter image description here

This is the entire code of my site. I have tried adding both Google Tag Manager and Google Adwords codes but does not work in any case:

<body>
<script>
var dataLayer = [{
    'dimension1':'My Custom Dimension 1',
    'metric1': 123456
}]
</script>
    <!-- Google Tag Manager -->
    <!-- End Google Tag Manager -->
<h1>Nuevo alojamiento</h1>
<script>
    //GA CODE

    ga('create', 'UA-76206495-2', 'auto');
    ga('send', 'pageview');

</script>
</body>

Upvotes: 0

Views: 2811

Answers (2)

nyuen
nyuen

Reputation: 8907

Pushing those values with those standard reference names in to GTM will not associate them with your hits, or make them show up in your reports. In GTM you need to grab the value of your CD and CM from the dataLayer. In this case you need to create dataLayer type variables that will give you access to dimension1 and metric1, although I would advise to rename them to something else other than the standard GA reference names, ie. dimensionX and metricX because that could be confusing. Then you need to pass the index and value for that CD and CM into whichever tag (page view, event, etc.) using those new names.

Edit: note that data won't show up in your standard reports until they have been processed, which takes up to 24 hours or so.

Upvotes: 1

Joss
Joss

Reputation: 555

As nyuen told me, I have to set those values in GTM, it was done bescause, if it wouldn't, data would not been sent. These are my settings

enter image description here

This sends the CD and CM in all pages. Custom vars are already set.

Preview mode of CTM displays this, it was fired:

enter image description here

And de dataLayer contains the data (I'm going to follow you advice and use another name):

enter image description here

So if I leave the preview mode and publish in GTM, I'm sure information is being sent, that is the GET request I placed before. Those values era in the URL as params (cd1 and cm1), so that is the reason why I'm pretty sure information is being sent to GA

enter image description here

Hope this extra information helps

UPDATE 1

I've changed dataLayer values to dim1 and met1 and now met1 is set to 123456789. Also, verified UA is right.

With those changes, chain sent to Google Analytics is the same (params are cd1 and cm1 with the appropiate values)

enter image description here

Upvotes: 1

Related Questions