How to track content Statistics for Facebook Instant Articles with Google Analytics

后端 未结 8 1736
有刺的猬
有刺的猬 2020-12-03 00:24

Hello we have setup the Facebook Instant Articles feeds in facebook.

Facebook\'s Instant Article feature for publishers (rolled out on FB iOS apps mostly for now 30

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-03 00:56

    Thanks for all the previous answers and solutions. They inspired me to summarize my learnings and solution in this public gist.

    I am using Google's global site tag (gtag.js) to track the pageview and successfully attribute it to the Social medium in Google Analytics.

    The following snippet illustrates what worked for me. Please note, we use jinja templates (with Nunjucks) to add the necessary and missing data (eg. {{googleAnalytics}}).

    I embedded it like this in my feed

    Implementation Docs

    • https://developers.facebook.com/docs/instant-articles/analytics
    • https://developers.facebook.com/docs/instant-articles/reference/analytics
    • https://developers.google.com/analytics/devguides/collection/gtagjs/pages

提交回复
热议问题