Skip to content

Facebook instant article

You want to collect the full potential of your data via INFOnline Measurement?

We recommend that you additionally integrate the pseudonymous measurement into your facebook instant article. Please note that participation of your site in IVW reporting may require parallel integration of pseudonymous measurement and census measurement in your facebook instant article.

Census measurement

Attention

If you activate pseudonymous measurement via the INFOnline Measurement Manager, it is mandatory to have the standalone script integrated in facebook instant article.

Requirements

  • Relay client container (hosted by INFOnline or self-hosted)
  • Registered domain service name as CNAME (hosted by INFOnline), AAA(A) (self-hosted) DNS entry
  • Site ID (provided by INFOnline GmbH)

Integration

A publisher can embed the fbia sensor for census measurement within an iframe in any article by using the Analytics element. Everything in this <iframe> will be executed at the beginning of each article load, but the web view will remain hidden from the reader. This embedding must be included in the <body> of the article and is not supported in the <head> or <footer>. Each <figure> should contain only one <iframe>. If a publisher wants to add more than one tracker, they can put the entire unescaped set of HTML and scripts into one <iframe> or use one <figure class="op-tracker"> for each <iframe>.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<figure class="op-tracker">
  <iframe>
    <!-- begin loading of IOMb bootstrap code -->
    <script type='text/javascript' src="//<domain service name>/iomb/latest/bootstrap/stub.js"></script>
    <script type='text/javascript' src='//<domain service name>/iomb/latest/sensor/standalone/fbia/es6/bundle.js'></script>
    <!-- end loading of IOMb bootstrap code -->
    <script>
      // The URL the user shared
      // (if there are no redirections, otherwise the final URL in the chain)
      IOMb('configure', { st: 'foo', dn: '<domain service name>' });
      IOMb('pageview', { cp: 'bar', fu: ia_document.shareURL });
    </script>
  </iframe>
</figure>
The following parameters can be passed with the function call IOMb(<command>, parameter):

command abbreviation name type standard length pattern mandatory description
'configure' st site String - 15 ^[a-zA-Z0-9_]*$ yes site identifier
'configure' dn domainServiceName String - - INFOnline CNAME convention1 yes Domain Service Name (CNAME or AAA(A) host)2
'configure' cn country Enum de - no INFOnline country (de or at)
'pageview' cp code String page_code_non-assignable 256 [^a-zA-Z0-9,_/\-?#.] no page code for the IVW Kat 2.0 Association
'pageview' co comment string - 256 /[ -~]/ no optional comment
'pageview' fu fbiaUrl String - URI 3 yes Canonical URL of the digital content

1 INFOnline CNAME convention: /^(data-)([a-f0-9]{10})\.([a-zA-Z0-9][a-zA-Z0-9-_]{0,61})(?:\.([a-z]{2,62}))?\.([a-z]{2,62})$/

2 If the notation of dn / domainServiceName does not match the INFOnline CNAME convention mentioned, no measurement takes place
3 URI schema

Attention

Before any events (e.g. pageview) can be measured, the fbia sensor must be configured with the configured command!

Attention

The following applies to parameters:
- Not set and the parameter is optional -> default value is used!
- Not set and the parameter is mandatory -> processing is aborted and a message is logged on the browser console in debug mode!
- Each parameter is queried before processing!

No measurement possible

It is currently not possible to measure digital video or audio content within Facebook Instant Articles because the event interface is missing in the Facebook ecosystem for Instant Articles.



Pseudonymous measurement

Prerequisites

  • Publisher site identifier provided by the INFOnline GmbH

Integration

A publisher can embed the IOMp Facebook instant articles standalone web sensor code within an iframe on each article using the Analytics element. Anything in this <iframe> will execute at the beginning of each article load, but the webview will remain hidden from the reader. This embed must be included in the <body> of the article and is not supported in the <head> or <footer>. Each <figure> should contain only one <iframe>. If a publisher wants to add more than one tracker, he can add the full unescaped set of HTML and scripts in one <iframe> or use one <figure class="op-tracker"> for each <iframe>.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<figure class="op-tracker">
  <iframe>
    <!-- begin loading of IOMp bootstrap code -->
    <script
      type="text/javascript"
      src="//script.ioam.de/sensor/latest/bootstrap/stub.js"
    ></script>
    <script
      type="text/javascript"
      src="//script.ioam.de/sensor/latest/standalone/fbia/es6/bundle.js"
    ></script>
    <!-- end loading of IOMp bootstrap code -->
    <script>
      // The URL the user shared
      // (if there are no redirections, otherwise the final URL in the chain)
      IOMp('configure', { st: 'foo'. ct: '0400810101' });
      IOMp('pageview', { cp: 'bar', co: 'baz', fu: ia_document.shareURL });
    </script>
  </iframe>
</figure>

The following parameters must and can be provided via the configure command:

Abbreviation Name Type Default Length Pattern Mandatory Description
st site String - 15 ^[a-zA-Z0-9_]*$ yes Site identifier
ct consent string String - 10 ^([0-9a-fA-F]{2})([0-9a-fA-F]{6})$ yes INFOnline consent string (optin)
cn country Enum de - - no INFOnline country (de or at)
dc distributionChannel Enum web - - no Distribution channel can be web, hyb, app, ctv
dg debug Boolean false - - no Debug flag

The following parameters can be provided via pageview command:

Abbreviation Name Type Default Length Pattern Mandatory Description
cp code String Leercode_nichtzuordnungsfaehig 256 [^a-zA-Z0-9,_/\-?#.] no Page code for the IVW Kat 2.0 association
co comment String - 256 /[ -~]/ no Optional comment
pt pixelType Enum cp - - no One of cp, sp, xp
fu fbiaUrl String - - URI 2 yes Canonical URL of the digital content

Before any events (e.g. pageview) can be measured the IOMp standalone sensor has to be configured by the configured command!

The following applies to parameters:

  • Not set and the parameter is optional -> Default value is used!
  • Not set and the parameter is mandatory -> processing will be aborted and a message is logged to browser console in debug mode!
  • Every parameter will be asserted before being processed!

Common pitfalls

It's not possible to measure any digital video or audio content due to the missing event interface in the Facebook instant articles eco system.


Last update: July 19, 2023