Is it possible to track which Facebook page an Instant Article receives its click from?

62 Views Asked by At

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>
0

There are 0 best solutions below