Variables in Google Tag Manager
-
Last week I got a great answer here on how to implement GTM and cross domain tracking, now that we have that in place I'm looking for some more advice
I'm wondering that if we push variabels into the data-layer of GTM, can we actually use those variables in reports as well? Do they get recorded in Google Analytics?
I'd like to use some data that we push to the data layer for segmentation purposes. Anybody an idea how to achieve this?
-
Thanks Martijn,
I'm looking at http://www.dbi.io/uk/how-to-segment-logged-in-users-using-google-analytics/ at the moment, I'll probably be able to set that variable when a certain pageview gets triggered.
-
Hi Joris,
By default it won't. The variables in Google Tag Manager can be used by sending, like you've mentioned, information to the dataLayer. But they won't be used automatically to have information send to Google Analytics. What you can do is send the information to your dataLayer and then use the variables in setting up the tracking via Google Tag Manager to send the variables in custom dimensions to Google Analytics.
So let's say you're pushing something to the dataLayer, then you would create a variable based on that and use that information in the next set of tags that you'll be creating. So for example setting a custom dimension would be:
ga('set', 'customDimension10', '{{Category}}');
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
GTM: Transaction value without tax as variable
Hi Mozzers, I'm trying to create a GTM variable for transaction value without tax. There is no datalayer field for this at the moment. e.g. I only have these fields in the datalayer: Revenue (€19.99) Tax (€3.47) Price (€19.99) No field with the price without tax. Is there a way to create a variable? Is it possible to work with a specific function? Or is it standard to implement an extra field in the datalayer? Many thanks,
Reporting & Analytics | | WeAreDigital_BE
Sander0 -
Google Analytics - Average Position
Hi Just trying to get some clarity on Google Analytics Average Positions in "Aquistions/Search Engine Optimisation". For a very competitive keyword Google Analytics is saying i am on average position of 6. Is this Page 6? I am assuming position six would be 1.6?
Reporting & Analytics | | Cocoonfxmedia0 -
Buffer Link and Google Impressions
Afternoon, I noticed a spike in impressions over a couple of days in April, so I investigated Analytics to see where these were coming from. It appears these impressions were split between two URLs; one was a blog post, the other was the Buffer link to the blog post that we used on Twitter and Facebook. According to Analytics, this Buffer URL received 1000 impressions over two days, with an average SERP position of 16. This surely can't be right, can it? Is this just another Analytics quirk? After two days of a decent amount of impressions to this Buffer link, the amount of impressions dropped to pretty much zero. I know Tweets are now starting to rank, but this would be the Twitter URL, not the Buffer link to our blog post? Any ideas, Cheers, Lewis
Reporting & Analytics | | PeaSoupDigital0 -
Google Tag Assistant showing Error
Hello, I am using google tag assistant extension in chrome and it is giving me one error for google tag manager at my checkout step 1 and error is -
Reporting & Analytics | | devdan0 -
Weird Google Analytics tracking question
I have a client that has a market place site, where people list goods and sell them, think something like Etsy. Instead of developing a system to show the users page views and things like that, does it sound reasonable to let them enter a Google Analytics property on the pages they list on, then let them monitor through GA? Does anyone see any fatal flaws in this thinking?
Reporting & Analytics | | LesleyPaone0 -
Whats 'Other' in Google Analytics (in Acquisition)
When i look in GA under Channels (under Acquisition) 'other' is listed What is 'other' ? I have been told its other unidentified channels as they did not allow 3rd party cookies or surfers were in anonymous/private mode. Other is usually organic traffic that couldn't be identified for the aformentioned reasons. This data is encrypted and available but it violates Google guidelines as they are not allowed to pass personal info//data to third parties so it is automatically filtered. But they are not 'Not Provided' (since that still shows under organic) but is usually/mainly some form of organic visits. Hence Seo can take credit for much of that traffic, is this correct ? Many Thanks
Reporting & Analytics | | Dan-Lawrence0 -
Domain Sub folder tracking from Google webmaster tool
I have created separate google webmaster access for this sub folder http://lineonebus.com/content/ Original domain http://lineonebus.com/ Search results in webmaster shows no search queries though this subfolder created in wordpress is ranking for some keywords.
Reporting & Analytics | | csfarnsworth1 -
Google Analytics Alternatives
I am getting really fed up with how unreliable Google Analytics data is. Also, because I have several large sites I can't use the goal tracking or conversion funnel reports. What are the best alternatives to Google Analytics?
Reporting & Analytics | | mascotmike0