Facebook Instant Articles (FIA) instructions

Facebook Instant Articles - FIA

Facebook Instant Articles is a mobile publishing format that enables news publishers to distribute articles to Facebook which load up to 10 times faster than the standard mobile web.

To follow these instructions you need to know how Content Insights (CI) tracking code works for websites and understand its parameters.

The tracking code should be set like this in the source of the instant article:

<figure class="op-tracker">
<script type="text/javascript">
var _ain = {
referrer: "http://ia.facebook.com", // this must be exactly like this on all requests
id: "__ID__",
url: "", // URL of the article
postid: "", // must match the _ain.postid value from the desktop version of the article
(function (d, s) {
var sf = d.createElement(s);
sf.type = 'text/javascript';
sf.async = true;
sf.src = (('https:' == d.location.protocol)
? 'https://d7d3cf2e81d293050033-3dfc0615b0fd7b49143049256703bfce.ssl.cf1.rackcdn.com'
: 'http://t.contentinsights.com') + '/stf.js';
var t = d.getElementsByTagName(s)[0];
t.parentNode.insertBefore(sf, t);
})(document, 'script');



If you are copying the code, please make sure that SSL URL string is not broken into two lines.

The <figure> and <iframe> tags are needed per FB documentation on FIA.

Since there must be a version of the article existing already on your website, other article metadata parameters are omitted.
Referrer field must be specified as "http://ia.facebook.com".

Domain ID, URL and Post ID must match the ones from the web version of the article. This is needed so the Content Insights platform can assign traffic to the proper article.

For details about importing article templates, please refer to original Facebook documentation.

Due to limitations imposed by Facebook, it’s not possible to properly track attention time on FIA. Our system is aware of this and it takes that into account when calculates the CPI.