问题
This question is related to, but distinct from How to track content Statistics for Facebook Instant Articles with Google Analytics
This question assumes we already have Google Analytics integrated into our Instant Articles setup, for which I recommend the following:
<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', 'YOUR_UID_REPLACE_THIS', 'auto');
ga('require', 'displayfeatures');
ga('set', 'campaignSource', 'Facebook');
ga('set', 'campaignMedium', 'Social Instant Article');
ga('set', 'title', ia_document.title);
ga('send', 'pageview');
</script>
The active question is what the campaignSource
and campaignMedium
values should be in order to have IA traffic show up in the Acquisition > Channels view of GA, and specifically, to get it into the Social and Facebook channels.
The code above uses Facebook
and Social Instant Article
, which work to identify IA traffic using the Acquisition > Source / Medium report, but in the Acquisition > Channels report they show up under Other and not even in Social at all.
So what, if anything, can we set our campaignSource
and campaignMedium
to to fix this?
Part of the answer is that we can edit the default channel defintions, such that our custom source / medium always get filtered into Social (GA reference), which you can read more about in this MarketingLand article. This should let us at least get this traffic out of Other and into Social, but I'm still not sure if it will show up under Social > Facebook or something else.
My idea is that maybe using source: facebook
or source facebook.com
will make the difference, but this requires slow testing.
I'm currently waiting for more data to be collected using the filter, so I don't know the answer yet. I am creating this question now in case others have already figured this out and to create a breadcrumb for myself later. Hopefully I can come back and answer my own question with a best-practice with the shortest possible path to getting IA traffic to be both identifiable in GA and reliably stored in Channels > Social > Facebook
回答1:
I was able to resolve it and summarized the "How to" here: https://stackoverflow.com/a/54112349/1238150. Hope this helps you and probably others as well.
来源:https://stackoverflow.com/questions/52412414/google-analytics-fb-instant-articles-what-source-medium-should-be-used-to-mak