Google Analytics Page Title is showing Ad Link
-
We have set the Analytics “Enable custom embed code” feature of the Instant Article plugin with the following code (note: using a dummy GA code here):
<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-11122233-1’, ‘auto’);
ga(‘require’, ‘displayfeatures’);
ga(‘set’, ‘campaignSource’, ‘Facebook’);
ga(‘set’, ‘campaignMedium’, ‘Social Instant Article’);
ga(‘set’, ‘title’, ‘IA – ‘+ ia_document.title);
ga(‘send’, ‘pageview’);
</script>and have used the tracker test to check the ia_document has a title populated:
https://www.ia-tracker.fbsbx.com/instant_article_test?url=URL
however the title for the google analytics record seems to be getting pulled from the Custom iframe URL ad set up. This is embedded once in the IA in the <header> as:
<figure class=”op-ad”><iframe src=”https://upliftconnect.com/wp-content/uplift-resources/ads/weeklysignup.html” width=”320″ height=”50″></iframe></figure>
All Instant Articles hits are recorded against this ad URL – which does not contain any GA code. The Instant Article Title is not being used.
Any thoughts?
Thanks.
- The topic ‘Google Analytics Page Title is showing Ad Link’ is closed to new replies.