Implementation web
1 About this integration guide
This ÖWA tag 3.0 Integration Guide provides you with all of the necessary information for implementation and configuration of the tag for the measurement of your site.
The integration guide explains the technical integration of the ‘ÖWA tag’ measurement instrument into your stationary website, your mobile-enabled website and your site in the area of connected TV.
Separate documents cover the measurement of apps for each operating system.
2 Measurement configuration
2.1 Regulations for implementing ÖWA tag 3.0
Only user-induced actions on a site that result or could result in advertising being accessed may be counted. Automatic reloads, automatic forwarding and similar actions may not be counted. As a matter of principle, only one page impression (PI) may be created per action.
Due to the limitation on user-induced requests, the following content cannot be counted:
- Automatic refresh
- Any Java applets, JavaScripts, ActiveX components, plug-ins and server push applications that generate their requests automatically.
- E-Mails
The following user actions in particular may not be counted:
- Accessing and changing content using the mouse (mouse over)
- Scrolling within content using the mouse or keyboard
The following content can be counted:
- HTML (classic, XHTML and AJAX)
- HTTPS
The ÖWA tag 3.0 can only be requested in the content frame. Any call made within an ad frame is not valid. For a site with frames, ensure that only one tag is requested per frame set.
2.2 ÖWA tag 3.0: setup and further notes
- In order to ensure accurate measurement, make sure that the ÖWA tag 3.0 is transferred unaltered into the source code of the site that is to be measured.
- Only the specified variables may be changed.
- Line breaks and the use of uppercase and lowercase letters must be retained.
The ÖWA tag 3.0 consists of two code parts:
An external JavaScript file in the header (implement without line break)
<script type="text/javascript" src="https://script-at.iocnt.net/iam.js"></script>
JavaScript variables (integration in the body section)
<!-- OEWA VERSION="3.0" -->
<script type="text/javascript">
if (window.iom) {
var oewa_data = {
"cn":"at", // country
"st":"angebotskennung", // sitename
"cp":"contentpath", // content path
"sv":"mo", // survey invitation will be shown in a mobile format
"ps":"lin", // Privacy setting
"sc":"yes" // MCVD Activation
};
iom.c(oewa_data,1);
}
</script>
<!--/OEWA -->
Supplement the ÖWA tag 3.0 with the site ID (st) of your site and the desired content path (cp).
- If you use other scripts on your web pages, do NOT use the “oewa_data” or “iom.c” variables there.
- Also, if you need to implement further variables, they should consist of three characters at least. That way you prevent your variables from being overwritten by ÖWA scripts.
- Downloading the external “iam.js” JavaScript and delivering it via your own server will lead to erroneous measurements.
2.3 Variables for the ÖWA tag 3.0
- st – Site ID
- The site ID assigned to your site; this is created and uniquely assigned by ÖWA; the ID is a maximum of 15 characters long.
- cp – Contentpath
- The contentpath is composed as follows: [SKTG]/[PAGEID]
Example: RedCont/Sport/Tennis/USOpen - [SKTG]:
Page Category based on the ÖWA category system, which is not allowed to be changed or extended.
For members of ÖWA it is mandatory to use the predefined three category layers (Seitenkontingent, Subkontingent and Profilingkontingent).
Example: „RedCont/Sport/Tennis“, „Community/ForenUndChats/Chat“ - [PAGEID]
It is possible to specify individual categories for advanced analysis (separated by „/“), but do not exceed the maximum length of 150 characters per contentpath.
Example: RedCont/Nachrichten/LokaleNachrichten/Vienna
For test purposes, „cp“ can be replaced by „xp“. In this case, the requests are rejected by the measurement system.
- The contentpath is composed as follows: [SKTG]/[PAGEID]
- sv – Survey invitation
- Valid values are „mo“ and „in“.
- „sv“:“in“
Survey invitation is delivered to the page in default size.
This is the default value. - „sv“:“mo“
For mobile optimized websites (survey invitation for mobile websites, size adjusted to display size).
- cn – Country ID
- Always „cn“:“at“ for Austria
- ps – Privacy setting
- Always „ps“:“lin“
- sc – MCVD Activation
- Always „sc“:“yes“
- Do not change any variables.
- When using the variables, be absolutely certain that the transition from the first to last variable is separated by a comma.
- The row containing the last variable must not contain a comma, however.
2.4 Alternative transmission methods
The ÖWA tag 3.0 allows you to choose from various methods of transmitting the measurement impulse (i.e. the measurement pixel request) to the measurement system.
Depending on the setup of the website it might be necessary to switch to a different transmission method. Please find further information in chapter 3.1.
Body Integration
<!-- OEWA VERSION="3.0" -->
<script type="text/javascript">
if (window.iom) {
var oewa_data = {
"cn":"at", // country
"st":"angebotskennung", // sitename
"cp":"contentpath", // content path
"sv":"mo", // survey invitation will be shown in a mobile format
"ps":"lin", // Privacy setting
"sc":"yes" // MCVD Activation
};
iom.c(oewa_data,<Transmission method*>);
}
</script>
<!--/OEWA -->
* The <transmission method> is to be set to the desired value:
Transmission method 1 (oewa_data,1): data is transmitted to the measurement server via the appendChild() method.
Transmission method 2 (oewa_data,2): data is transmitted to the measurement server via the newImage() method.
Transmission method 0 (oewa_data,0) or (oewa_data): data is transmitted via document.write() method (Default method! Used when transmission method is not explicitly specified).
Example(Transmission method 2):
Body Integration
<!-- OEWA VERSION="3.0" -->
<script type="text/javascript">
if (window.iom) {
var oewa_data = {
"cn":"at", // country
"st":"angebotskennung", // sitename
"cp":"contentpath", // content path
"sv":"mo", // survey invitation will be shown in a mobile format
"ps":"lin", // Privacy setting
"sc":"yes" // MCVD Activation
};
iom.c(oewa_data,2);
}
</script>
<!--/OEWA -->
We recommend using transmission method 1 (oewa_data,1), especially if your web applications use technologies like AJAX for user interaction.
2.5 Parallel measurement ÖWA and INFOnline (IVW, AGOF)
In the case of parallel measurement into the Austrian measurement system (ÖWA) and into the German measurement system (INFOnline) the script call of each provider have to be implemented directly before the tag in the body section.
Body Integration
<!-- OEWA VERSION="3.0" -->
<script type="text/javascript">
if (window.iom) {
var oewa_data = {
"cn":"at", // country
"st":"angebotskennung", // sitename
"cp":"contentpath", // content path
"sv":"mo", // survey invitation will be shown in a mobile format
"ps":"lin", // Privacy setting
"sc":"yes" // MCVD Activation
};
iom.c(oewa_data,<Transmission method*>);
}
</script>
<!--/OEWA -->
<!-- INFOnline-->
<script type="text/javascript" src="https://script.ioam.de/iam.js"></script>
...
...
<!--/INFOnline -->
2.6 Configuration of the ÖWA tag 3.0 for the hybrid app measurement
In the case of hybrid apps, the measurement is performed both via the measurement library, which is installed in the native app frame, and via the ÖWA tag 3.0, which is implemented in the web content, that is to be displayed in the hybrid app.
In order to activate the ÖWA tag 3.0 for the hybrid measurement, the method iom.c must be changed to iom.h. The measurement of the web content outside the app is not affected. Browser calls will continue to be counted correctly.
Example (iom.h()):
<!-- OEWA VERSION="3.0" -->
<script type="text/javascript">
if (window.iom) {
var oewa_data = {
"cn":"at", // country
"st":"angebotskennung", // sitename
"cp":"contentpath", // content path
"sv":"mo", // survey invitation will be shown in a mobile format
"ps":"lin", // Privacy setting
"sc":"yes" // MCVD Activation
};
iom.h(oewa_data,<Transmission method*>);
}
</script>
<!--/OEWA -->
3 Other measurement variants
3.1 Dynamic web page content measurement
Dynamic web pages, when based on AJAX for example, can perform HTTP requests, while the web page itself is already being displayed completely. Parts of the content can be refreshed or reloaded, for example by sliding through an image gallery, without reloading the whole page.
The ÖWA tag 3.0 supports measuring these partial web page reloads. For this purpose we recommend sending the requests to our servers via appendChild method (oewa_data,1) or via newImage method (oewa_data,2) set in the ÖWA tag 3.0 (for more information on transmission methods see chapter 2).
Furthermore it is mandatory to reload the iom.c method (see ÖWA tag 3.0 code snippet in chapter 2) along with each partial web page reload.
3.2 AMP-Analytics
In order to enable measurement of accesses to AMP websites (https://www.ampproject.org) you need a specific analytics tag that requires the addition of the particular site ID and the content path. The URL needs to refer to a website that contains a particular ÖWA tag and is delivered via HTTPS. It’s necessary to deliver this website via a different subdomain than the AMP website. In addition, it has to be included in the Locallist. Regarding AMP websites, there are no invitation ads (BFE). For further details see https://www.ampproject.org/docs/analytics/analytics-vendors#oewa
1. Add in <head> of AMP website (without a new line) :
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
2. Measurement of AMP websites (pageview) :
<amp-analytics type="oewa" id="oewa">
<script type="application/json">
{
"vars":{
"st":"angebotskennung",
"co":"comment",
"cp":"contentpath",
},
"requests":{
"url":"https://sub.example.com/amp-analytics-oewa.html",
}
}
</script>
<amp-analytics>
Please make sure not to insert any additional line breaks and to fill the variables („vars“) „st“ and „cp“ with the respective values:
st= Sitename
cp= Content path
co= Comment(optional)
Please note that the „url“ property must point to a subdomain of your choice and must provide the content of the HTML website shown below. The name of the HTML file can be freely selected.
Special HTML website with ÖWA tag
The follwing must be stored here:
<html>
<head>
<script src="https://script-at.iocnt.net/iam.js"></script>
</head>
<body>
<script>
var match,
pl = /\+/g,
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
query = window.location.search.substring(1);
var oewa_data = {};
while (match = search.exec(query)) { oewa_data[decode(match[1])] = decode(match[2]); }
oewa_data["st"] = oewa_data["s"];
delete oewa_data["s"];
oewa_data["cn"] = "at";
oewa_data["ps"] = "lin";
oewa_data["sv"] = "ke";
iom.c(oewa_data,1);
</script>
</body>
</html>