Instant Articles google analytics article title
-
Hello there,
we have some issues on setting title on google analytics tracker so we can get the instant article title on google analytics.
Here what’s the code we are using:
<!– START Google Analytics –>
<script>
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’https://www.google-analytics.com/analytics.js’,’ga’);ga(‘create’, ‘UA-XXXXXXXX’, ‘auto’);
ga(‘require’, ‘displayfeatures’);
ga(‘set’, ‘campaignSource’, ‘Facebook’);
ga(‘set’, ‘campaignMedium’, ‘Instant Articles’);
var titleIA = ia_document.title;
ga(‘send’, ‘pageview’, {title: ‘+titleIA+’});</script>
For some reason the variable titleIA is not working, any tips?
many thanks!
- The topic ‘Instant Articles google analytics article title’ is closed to new replies.