Facebook Instant Articles
How to implement Analytics in Facebook Instant Articles.
Facebook Instant Articles is a new method for publishers to build fast, interactive articles on Facebook. Instant Articles can load content up to 10 times faster than mobile web.
Adobe Analytics can be embedded within the Facebook Instant Articles to track visitor behavior as they interact with the content. Because publisher content is within the Facebook app and not on the publisher's websites, the tagging approach is slightly different than a standard Analytics implementation.
Step 1. Embed an Analytics HTML page
When creating your Facebook Instant Article content, you can embed the analytics HTML content within an iFrame. For example:
<iframe class="no-margin" src="https://[your-domain-here]/analytics.html" height="0"></iframe>
Step 2. Modify your Analytics HTML
The sample HTML below can be used to capture stats from the instant articles. This file would typically be hosted on one of your company's web servers. Each time an Instant Article is loaded, it loads the file in an iframe as outlined in step one, which triggers sending the analytics data to Adobe.
To modify this sample HTML for your specific implementation
- It is recommended to host the latest copies of unmodified versions of the VisitorAPI.js and AppMeasurement.js on a common directory on your company's web servers.These files can also be downloaded from within the Code Manager in the Analytics UI if required.
- Include your Analytics implementation standard configuration variables:
- Your Experience Cloud Org ID.
- The report suite ID where the Facebook Instant Article traffic will be captured.
- Your company's tracking server domain.
- Your visitor namespace variable. Note: Many of these values can be found within your standard Analytics implementation. Customer Care or Adobe Consulting can assist in providing the proper values if necessary.
- Include the page view image request syntax ( s.t()) .
Step 3. Set custom variable and event tracking
s.prop10 = "Facebook Instant Article";
You can also dynamically send variables to the iframe by leveraging query string parameters in the iframe src attribute. For example:
<iframe class="no-margin" src="https://[your-domain-here]/analytics.html?prop1=dynamic%20article%20title&eVar1=facebook%20page%20name&pageName=your%20page%20name%20here&cmpId=your%20campaignID%20here" height="0"></iframe>
s.pageName = s.Util.getQueryParam("pageName"); s.campaign = s.Util.getQueryParam("cmpId"); s.eVar1 = s.Util.getQueryParam("eVar1"); s.prop1 = s.Util.getQueryParam("prop1");
Adobe Analytics is excited to partner with Facebook and our publishers to bring industry leading analytics capabilities to publishers on the mobile web in a blazing fast user experience. We are committed to building the best long term solution to answer the evolving analytics needs our customers have.
The Facebook Instant Article project is moving quickly and changes are happening all the time, so check back with us frequently for updates. Expect changes as we improve our integrations further and as more publishers adopt Facebook Instant Articles in the future.
If you have questions or problems, please reach out to your Adobe Consultant or Customer Care.