0

I am using the code below to track pageviews of instant articles, but what I really need is to be able to track which Facebook page an article gets its click from.

For example, I have several Facebook pages and will post a link to the same instant article on them all. I need to be able to track how many hits I get from each Facebook page.

If there is a line of code I can add to this to do that, I would greatly appreciate any help you can give me. I am not a total rock when it comes to coding, but I am in the early stages of teaching myself, so please be as specific as possible. I'm at that stage where I know just enough to hurt myself. LOL Thanks!

<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-1', 'auto');
  ga('set', 'forceSSL', false);
  ga('require', 'displayfeatures');
  ga('set', 'campaignSource', 'Facebook');
  ga('set', 'campaignMedium', 'Social Instant Article');
  ga('set', 'title', ia_document.title);
  ga('send', 'pageview');
</script>
SGT A
  • 1
  • 1
  • I think you should first read [ask] and do some research with google for instance: [link](https://stackoverflow.com/questions/36310439/how-to-track-content-statistics-for-facebook-instant-articles-with-google-analyt) – Picard May 23 '17 at 17:26
  • Possible duplicate of [How to track content Statistics for Facebook Instant Articles with Google Analytics](https://stackoverflow.com/questions/36310439/how-to-track-content-statistics-for-facebook-instant-articles-with-google-analyt) – Picard May 23 '17 at 17:26
  • I did both. If you could give me a hint how I erred in asking my question I would appreciate the hint. I have been trying to find the answer to this for better than a week with Google and while I thought I was close a coupe of times, I either do not understand the answer, or I am not finding the correct answer because try as I have, I can't seem to get that one last bit of info I want to show. Thanks for the link! Esp if it works. LOL :-) – SGT A May 28 '17 at 17:21

0 Answers0