Analytics
4.2K members online now
4.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

How to Add Custom DImensions via GTM and GA?

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

I've added below details in dataLayer. 

 

"customerLoggedIn":"Yes",
"customerId":17,
"visitorExistingCustomer":"Yes",
"visitorLifetimeValue":565,
"visitorLifetimeOrders":12,
"customerGroupCode":"General"

 

How can I configure GA and GTM in order to see above details in GA?

 

Can someone please help me?

 

Thanks
Stephen 

1 Expert replyverified_user

Re: How to Add Custom DImensions via GTM and GA?

Top Contributor
# 2
Top Contributor
Hi Stephen,

Please check the document below for instructions:

https://support.google.com/analytics/answer/6164990?hl=en

Hope it helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: How to Add Custom DImensions via GTM and GA?

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆
Hi Arnold,

As per my understanding I need to apply below steps.

1) GA: Add Custom Dimension -> Name -> Scope [User] -> Active (For all 6)
2) GTM:
A) Add dataLayer variable through variable (For all 6)
B) Add 6 custom dimensions in GA (pageview) and GA (transaction) tags. (All 6)

Please correct me if it is wrong.

Thanks
Stephen

Re: How to Add Custom DImensions via GTM and GA?

Top Contributor
# 4
Top Contributor
Hi Stephen,

Yes, that's correct.

Let me know how you get on.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: How to Add Custom DImensions via GTM and GA?

[ Edited ]
Follower ✭ ✭ ☆
# 5
Follower ✭ ✭ ☆

Hi Arnold,

Please see below displayed implementation of custom variables from start, It is not working well. Can you please review them? Looking forward to hear from you soon. 


Custom Variables on Site

<body><script>
dataLayer = [{
	"customerLoggedIn":"Yes",
	"customerId":17,
	"visitorExistingCustomer":"Yes",
	"visitorLifetimeValue":123,
	"visitorLifetimeOrders":3,
	"customerGroupCode":"General",}];
</script>
<!-- Google Tag Manager Start -->
<!-- Google Tag Manager End --> 

1.pngSelected as dataLayer Version 2


2.pngAdded as Custom Dimension in Analytics tag of GTM


 

3.pngAdded into GA as Custom Dimension

 

 

 

Re: How to Add Custom DImensions via GTM and GA?

Follower ✭ ✭ ☆
# 6
Follower ✭ ✭ ☆

Hi Arnold, 

 

Can you please review this? Looking for your help.

 

Thank you, 

Falgun 

Re: How to Add Custom DImensions via GTM and GA?

Top Contributor
# 7
Top Contributor

Hi,

 

Please try in your code:

<script>
dataLayer = [{
	"dimension2":"Yes",
	"dimension1":17,
	"dimension4":"Yes",
	"dimension6":123,
	"dimension5":3,
	"dimension3":"General",}];
</script>

Basically change the dimension name to "dimension#" from GA.

Let me know if it works.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: How to Add Custom DImensions via GTM and GA?

Follower ✭ ✭ ☆
# 8
Follower ✭ ✭ ☆

I've edited as you've mentioned. I can see proper values in my website source earlier as well. But I guess there is issue with custom reports configuration. I'm not sure why GA didn't detect any actual value? I believe there is something wrong with the way I've created custom reports. 

 

Can you please see if it is all good? 

 

 

 

4.pngGA Custom Report

 

 

 

How to Add Custom DImensions via GTM and GA?

Top Contributor
# 9
Top Contributor

Are you able to see data collected in standard reports if you choose a custom dimension as the secondary dimension? For eg in Behavior -> Site Content -> All Pages?


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: How to Add Custom DImensions via GTM and GA?

Follower ✭ ✭ ☆
# 10
Follower ✭ ✭ ☆

No, it is not working too. Please see attached snapshot. 

5.pngGA Snapshot