Facebook Instant Articles

Parse.ly is collaborating with Facebook to enable tracking of Facebook Instant Articles. To implement Parse.ly tracking on your Instant Articles, follow the instructions on this page.

Make sure your Instant Articles are already configured and served properly, including your RSS feeds. For more information on this, please visit Facebook’s Instant Articles documentation.

There is no need to implement metadata on an Instant Article because there must be a version of the article on your website already. Make sure to use the correct canonical URL of the existing article, and we will automatically associate its metadata with the Facebook Instant Article version. Here is an example of a canonical URL to be used in Facebook Instant Articles source code:

<link rel="canonical" href="https://blog.parse.ly/post/2109/meet-espns-benjamin-alamar/">

Once your Facebook Instant Articles are error-free, insert the following code snippet before the closing </article> tag. For more information on proper tracker formatting, please consult Facebook’s documentation here.

<!-- Analytics code for your article -->
<figure class="op-tracker">
    <iframe>
        <script>
            PARSELY = {
                autotrack: false,
                fbInstantArticles: true,
                onload: function() {
                    PARSELY.beacon.trackPageView({
                        urlref: 'http://facebook.com/instantarticles'
                    });
                    return true;
                }
            }
        </script>
        <div id="parsely-root" style="display: none">
            <span id="parsely-cfg" data-parsely-site="###########"></span>
        </div>
        <script>
            (function(s, p, d) {
            var h=d.location.protocol, i=p+"-"+s,
            e=d.getElementById(i), r=d.getElementById(p+"-root"),
            u=h==="https:"?"d1z2jf7jlzjs58.cloudfront.net"
            :"static."+p+".com";
            if (e) return;
            e = d.createElement(s); e.id = i; e.async = true;
            e.src = h+"//"+u+"/p.js"; r.appendChild(e);
            })("script", "parsely", document);
        </script>
        <!-- END Parse.ly Include: Standard -->
    </iframe>
</figure>

Note

Replace ########### with the apikey of your site.

This tracking code must be placed on all Instant Articles you wish to track, whether you are manually uploading the articles or syndicating them via Facebook's preferred RSS feed. For more details on automated RSS publication, please consult Facebook's documentation here.

Unique Visitor Duplication

Facebook does not offer the ability to assign user identifiers that can be linked to those generated by the standard Parse.ly JavaScript tracker on your website. As a result, a reader who views an Instant Article in the Facebook app and later views an article on your own domain will be counted as two visitors instead of one. We account for this fact in our calculation of new vs. returning visitors.

Engaged Time Tracking

Facebook does not offer the ability to track engagement as accurately as the standard Parse.ly JavaScript tracker does on your website. In Facebook Instant Articles, a user is said to be engaged while the article is displaying on their device. In the Facebook application there is no concept of tabs or multiple windows therefore if an article is displaying then the user must not be engaged with anything else. If a device is locked or the Facebook application is put into the background the user is said to be not engaged.

Upgrading To Engaged Time Tracking From Existing Installations

Legacy documentation

If you are a new Parse.ly customer, you can ignore this section. This is only for existing customers who implemented Facebook Instant Articles tracking prior to June 2018. For any customers who implemented tracking on or after June 1st 2018, the code snippet above is already configured to track engaged time.

To activate engaged time tracking, search your Facebook Instant Article source template for the line that looks like this:

PARSELY = {
    autotrack: false,

Beneath that line, insert the following line:

fbInstantArticles: true,

so that it looks like:

PARSELY = {
    autotrack: false,
    fbInstantArticles: true,

and save your template. This enables engaged time tracking for your Facebook Instant Articles.

Contact us

Please contact your account manager after making the changes above, so that we can ensure the new engaged time data is accurately reflected in your dashboard.

Please allow up to an hour after implementing this change for Facebook Instant engaged time to be reflected in the Parse.ly dashboard: often, however, the change is visible before that.

FAQ

How can I verify that my FB Instant Articles are tracking properly in Parse.ly?

If you're tracking Instant Articles correctly, you'll see data in the "Channels" section of your dashboard (https://dash.parsely.com/example.com/channels/fbia). Email support@parsely.com if you need help debugging your implementation.

Do you have an urgent support question?