Analytics
2.2K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

Tag Manager Content Grouping - (not set) Analytics report

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi guys, 

 

I just set up Content Grouping with Tag Manager to count words within a blog post via a custom javascript variable. With the preview and debug mode I can see that the word length is correctly transferred to the variable and google analytics (GA debugger). 

 

Now I get a lot of (not set) data in the content grouping report as you can see below: 

 Bildschirmfoto 2016-08-21 um 16.15.08.png

 

I have no clue how this (not se) data is generated. Maybe you guys can help me? 

 

Thanks a lot!

 

Best regards, 

Anton 

1 Expert replyverified_user

Re: Tag Manager Content Grouping - (not set) Analytics report

Top Contributor
# 2
Top Contributor
Hi there,

you're going to run into reporting issues with this (using a custom dimension would be more useful)
You may want to consider using word count ranges instead of absolute values: 0-50, 51-100, 100-200 (you get my drift)

As for your (not set) issue, there is clearly an issue where the number of words is not captured, hence the (not set).
Can you share your GTM setup for word count?
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Tag Manager Content Grouping - (not set) Analytics report

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Julien,

thanks for your immediate reply. Following my current setup: 

 

JavaScript variable to read out words from all text classes in the document:

 

function countWords() {
var allText='';
var nodeList = document.querySelectorAll("[id^=text-block]");
for(var i = 0; i < nodeList.length; i++){
allText += ' ' + nodeList[i].textContent;
}
//return the total count after getting the textContent from all elements
return allText.replace(/(^\s*)|(\s*$)/gi,"")
.replace(/[ ]{2,}/gi," ")
.replace(/\n /,"\n")
.split(" ").length;
}

 

And here my tag setup:

 

Bildschirmfoto 2016-08-23 um 11.31.18.png

 

Plus the Trigger: 

Bildschirmfoto 2016-08-23 um 11.43.21.png

 

 

Should trigger on ever page which contains /superfood-lexikon/...

 

The confusing thing ist that the variable is filled on every page. So basically there should be no (no set). I hope your solution with custom dimensions helps. Thanks for this!

 

Best regards, 

Anton

 

Re: Tag Manager Content Grouping - (not set) Analytics report

Top Contributor
# 4
Top Contributor
Make your regex simpler:

/superfood-lexicon/

Bam. Nothing more required.
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Tag Manager Content Grouping - (not set) Analytics report

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi Julien,

/superfood-lexikon/ alone should not be tracked but everything that matches /superfood-lexikon/ and follows the slash like /superfood-lexikon/goji or /superfood-lexikon/chia-seed

What is the regEx in this case?

Thanks

Re: Tag Manager Content Grouping - (not set) Analytics report

Top Contributor
# 6
Top Contributor
That *was* the regex.
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan
Marked as Best Answer.
Solution
Accepted by topic author Anton A
August 2016

Re: Tag Manager Content Grouping - (not set) Analytics report

Top Contributor
# 7
Top Contributor
try it out
http://tools.netshiftmedia.com/regexlibrary/
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Tag Manager Content Grouping - (not set) Analytics report

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
Thanks Julien, I figured it out Smiley Happy