Content Grouping
-
Hi,
I’d like to do a specialized content grouping following the example shown here: https://dcarlbom.com/google-analytics/content-grouping-with-wordpress-and-google-analytics/#gref
I’ve set all this up, and it works in Tag Manager Preview but I think the parameters are not being passed to Tag Manager because the push happens after the tag manager code.
I’ve tried placing my script before yours but that doesn’t work.
It looks like placement needs to after your datalayer script but before the google tag manager code.
Any thoughts on how I might make this work? (Apologies in advance, as I’m not a programmer).
Best,
Glenn<script>
dataLayer = [{“title”:”Converse Annual Fund 2016-17″,”author”:”Glenn Abel”,”wordcount”:249,”logged_in”:”false”,”page_id”:209,”post_date”:”2015-09-28 15:33:12″}];
</script>
<!– Google Tag Manager –>
<noscript><iframe src=”//www.googletagmanager.com/ns.html?id=GTM-N6845M” height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘//www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-N6845M’);</script><script>
var dataLayer = window.dataLayer = window.dataLayer || [];
dataLayer.push({‘pageType’: ‘Page’})
</script>
- The topic ‘Content Grouping’ is closed to new replies.