Facebook Instant Articles
Instructions to add Chartbeat code to your Facebook Instant Article pages.

Intro to Facebook Instant Articles

Chartbeat tracking for Facebook Instant Articles is a feature included in all customer plans.
Facebook's Instant Articles are HTML documents optimized for fast mobile performance within the Facebook mobile app. Upon integrating Chartbeat code on these pages, a new filter labeled 'Facebook IA' will appear under the Distribution module in your Real-Time Dashboard, displaying real-time traffic data for all visitors to your instant article pages.

Check your Implementation Review

Our Implementation Review lets Admin users view data snapshots from the latest full calendar day we have on hand.
Please note that a 5-10% difference between platforms is generally expected. If data is not coming through as expected, check out common issues in troubleshooting pageviews and unique discrepancies page
For details on general use of the dashboard please see our Implementation Review Introduction in our documentation

To access your Implementation Review:

  1. 1.
    Sign in to your Chartbeat account.
  2. 2.
    Navigate to Settings from the menu top right-head
  3. 3.
    Implementation Review pages on the left side menu
  4. 4.
    Navigate to the Platform Audit and Traffic Audit Tabs
Tip: If you cannot access the Implementation Review, verify with your organization if your account has the required Admin role.
Once you're able to access the dashboard, here are some useful QA steps to ensure proper tracking:

Platform Audit

  1. 1.
    Navigate to the Platform Audit Tab to view the Implementation Summary Table
  2. 2.
    Locate the "FBIA" column and corresponding cell for the site and platform of interest
If there is a green checkmark in the corresponding cell, that means Chartbeat is receiving significant web traffic from the site at the time snapshot was taken.

Traffic Audit

  1. 1.
    Select a site and verify the timezone and snapshot date.
  2. 2.
    Summary table: reference Web pageviews breakdown to validate snapshot counts
  3. 3.
    Device breakdown by platform: section selects Web as an option in the dropdown to see data on visitors viewing your site across unique device types.
  4. 4.
    Top Articles by pageviews: View the top 20 canonical paths and corresponding pageviews across all platforms
If data in the Implementation Review snapshots are as expected, your site is implemented correctly for this Facebook Instant Articles. If more QA or troubleshooting is needed please continue with the additional QA steps below to assess your implementation.

Validate your existing FIA HTML

Make sure that your site's Instant Articles are properly configured according to Facebook's HTML specification. Your Instant Articles should also be validated using Facebook IA's Page Manager.

Insert our tracking code

Insert the following code snippet in the <body> of your page HTML:
<figure class="op-tracker">
<iframe>
<script type='text/javascript'>
(function() {
var _sf_async_config = window._sf_async_config = (window._sf_async_config || {});
/** CONFIGURATION START **/
_sf_async_config.uid = #####; //CHANGE THIS TO YOUR ACCOUNT ID
_sf_async_config.domain = 'domain.com'; //CHANGE THIS TO YOUR SITE ID
_sf_async_config.sections = ''; //SET PAGE SECTION(S)
_sf_async_config.authors = ''; //SET PAGE AUTHOR(S)
_sf_async_config.path = ''; //SET PAGE CANONICAL URL
_sf_async_config.title = ''; //SET PAGE TITLE
/** CONFIGURATION END **/
})();
</script>
<script defer src="//static.chartbeat.com/js/chartbeat_fia.js"></script>
</iframe>
</figure>
The uid and domain configuration variables in the above snippet should be assigned to your Chartbeat account id and site id, respectively.
Section, author, path, and page title variables should be populated by your Facebook IA feed CMS with page metadata that matches precisely the metadata sent from your standard website. If the Chartbeat code on your website utilizes our useCanonical and useCanonicalDomain settings for our tracker to collect the canonical URL from your page HTML, your Facebook IA Chartbeat code should send the same canonical URL via the path configuration variable. For example, if an article's canonical URL is https://mysite.com/news/article-xyz.html, the path variable should be populated as follows in that page's Facebook Instant Article HTML:
_sf_async_config.path = 'mysite.com/news/article-xyz.html';
Tip: if your website integration utilizes our optional content type and/or sponsor name configuration variables to send additional page metadata, these variables can also be added to the Chartbeat code in your Facebook Instant Articles.

Limitations

Chartbeat video tracking for Instant Article pages is unsupported at this time.

QA steps

Upon a successful Chartbeat integration with your Instant Article pages, a new Facebook IA filter will appear in the left-hand side of your Real-Time Dashboard (screenshot below).
FIA filter in Real-Time Dashboard
Select the Facebook IA filter in your Real-Time Dashboard to perform the following data QA checks:

Under 'Top Pages':

  • Page titles are populating as expected
  • Hover over page titles in this list to view the canonical paths received from these pages. Alternatively, click into the article view and right-click the title to copy the link address
  • Check for duplicate page entries in this list, and identify the discrepant paths being received from these pages to determine the fix in your configuration settings
  • Open the section & author drop-down filters to ensure section & author data is populating as expected
Tip: The page property metadata (sections, authors, path, title, and content type) configured to send from your FIA pages should match exactly the data we receive from those same pages on your standard website via our standard JavaScript tag, and stay consistent across all of your other Chartbeat tracked platforms. Check to ensure the page data being sent from your Instant Articles to Chartbeat aligns precisely with the data we receive from those same pages across your other Chartbeat-tracked platforms.
Copy link
Outline
Intro to Facebook Instant Articles
Check your Implementation Review
Validate your existing FIA HTML
Insert our tracking code
Limitations
QA steps