How to track Facebook instant article with Google analytic

How to track Facebook instant article with Google analytic

Hi developers, In this tutorial, you will learn how to add Google analytic tracking code to the Facebook instant article with customization. Facebook instant article store your website post content and displayed from its own server , resulting in the tracking of page views for Google analytic. But in this How to track Facebook instant article with Google analytic tutorial you will learn to customize your analytic tracking code for your Facebook instant article, so start following the below steps to track your website page views even on Facebook instant articles using Google analytic tracking code.

The above code does four main things:

  • Creates a <script> element that starts asynchronously downloading the analytics.js JavaScript library from https://www.google-analytics.com/analytics.js
  • Initializes a global ga function (called the ga() command queue) that allows you to schedule commands to be run once the analytics.js library is loaded and ready to go.
  • Adds a command to the ga() command queue to create a new tracker object for the property specified via the ‘UA-XXXXX-Y’ parameter.
  • Adds another command to the ga() command queue to send a pageview to Google Analytics for the current page.

Note: Instead of UA-XXXXX-Y add your own Google analytic ID

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular

Buzzing your life from assorted Coding,tips and general life opinion. Made your life Buzz by BuzzMyCode articles, share with world.

What is Buzzmycode, we had started this website to give tech savy the new way of life by reading our fresh organic content on every technology and applications.

Copyright © 2017 SyncSaS. Theme by SyncSaS Themes, powered by BuzzMyCode.

To Top