Skip to content

standalone solution: census measurement hybrid (hybrid measurement)

Prerequisites

  • Relay client container (hosted by INFOnline or self-hosted)
  • Registered domain service name as CNAME (hosted by INFOnline), AAA(A) (self-hosted) DNS record
  • Site ID (provided by INFOnline GmbH)
  • INFOnline App SDK Census (iOS / Android)

Application areas

The hybrid sensor for census measurement can be used in the following areas and cross-platform development frameworks:

Characteristics

The hybrid sensor has the following features:

  • Automatic detection of Android and iOS webviews.
  • Features two modes: hybrid and normal measurement
  • Command queue (allows bundle loading and command input to be split).
  • Parsing, validation and serialization of commands
  • Measurement of page impressions within an Android or iOS webview.

Bootstrapping

Using preload and bundle loader

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <title>website</title>
  <!-- begin preload of IOMb standalone sensor -->
  <link rel='preload' href='//<domain service name>/iomb/latest/sensor/standalone/hybrid/es6/bundle.js' as='script' id='IOMbBundle'>
  <link rel='preload' href='//<domain service name>/iomb/latest/bootstrap/loader.js' as='script'>
  <!-- end preload of IOMb standalone sensor -->
  <!-- begin loading of IOMb bootstrap code -->
  <script type='text/javascript' src="//<domain service name>/iomb/latest/bootstrap/loader.js"></script>
  <!-- end loading of IOMb bootstrap code -->
</head>
<body>
<!-- content -->
</body>
</html>
Note

The <domain service name> should be replaced with the AAA(A) or CNAME DNS record of the service platform (relay client).

Without preload and bundle loader

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <title>website</title>
  <!-- begin loading of IOMb bootstrap code -->
  <script type='text/javascript' src="//<domain service name>/iomb/latest/bootstrap/stub.js"></script>
  <!-- end loading of IOMb bootstrap code -->
</head>
<body>
<!-- content -->
<script type='text/javascript' src='//<domain service name>/iomb/latest/sensor/standalone/hybrid/es6/bundle.js'></script>
</body>
</html>
Attention

Any change in the paths to the bundle or stub will inevitably cause the measurement to fail. Only the <domain service name> should be replaced with the AAA(A) or CNAME DNS record of the service platform (relay client).

Configuration

To configure the hybrid sensor, the publisher must include a script snippet in the <body> of the HTML content. The snippet itself contains the following statement:

1
2
3
<script type='text/javascript'>
  IOMb('configure', { st: 'foo', dn: 'data-acbd18db4c.example.com' });
</script>
The following parameters must and can be specified using the configure command:

abbreviation name type default length pattern mandatory description
st site String - 15 ^[a-zA-Z0-9_]*$ yes Site identifier
dn domainServiceName String - - INFOnline CNAME convention1 yes Domain Service Name (CNAME or AAA(A) Host)2
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
hy hybrid Boolean false - - no Must be true to enable hybrid mode

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 correspond to the mentioned INFOnline CNAME convention, no measurement takes place
.

Attention

Before pageview events can be measured, the hybrid 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!

Attention

To measure in hybrid mode, the parameter hy must be set to true.

Pageview

To measure a pageview (the digital content is viewed by the receiver), the publisher must send the pageview command using the global function IOMb(). To send a pageview event from the hybrid sensor, the publisher must place a script snippet in the <body> of the HTML content. The snippet itself contains the following statement:

1
2
3
<script type='text/javascript'>
  IOMb('pageview', { cp: 'bar', co: 'baz' });
</script>

The following parameters can be passed with the pageview command:

abbreviation name type default length pattern mandatory description
cp code String page_code_non-assignable 256 [^a-zA-Z0-9,_/\-?#.] no page code for the IVW Kat 2.0 association
co comment String - 256 /[ -~]/ no -
pt pixelType Enum cp - - no One of cp, sp, xp
Attention

The contents of the parameters cp and co will be truncated if the maximum length is exceeded. Furthermore, the contents of the cp parameter will be cleaned up and all characters which violate the above pattern will be replaced by a '.'.

Attention

When the hybrid environment is detected, the page code is converted to the hybrid notation by the following rules:

condition result
app site identifier equal web site identifier ___hyb2___{app site identifier}___{app code}
app site identifier does not match web site identifier ___hyb___{web site identifier}___{app code}

Last update: November 2, 2021