Guides‎ > ‎TV Analytics‎ > ‎

TV Analytics Plugin

Version 3.6.1, updated 2016-02-24



The wywy TV Analytics Plugin allows you to enhance the tracking data on your website with TV commercial airing data. You will be able to distinguish which of your visitors interacted with your website while a commercial was running or shortly after.

The plugin can be integrated by simply including a javascript tag on your website, which will load the plugin  from our servers. The JavaScript source URL will load the correct plugin based on the parameters sent in the request - only 'customer' and 'backend' are mandatory for the plugin to work, all other parameters are optional and have default values if not set.




Script for copy&paste purposes, please replace your customer ID and set your backend accordingly

<!--start wywy tag -->

<script type="text/javascript" src="//analyze.wywy.com/?customer=123456&backend=wy"></script>
<!--end wywy tag -->


The above will load our plugin which pushes tv commercial airing data to your analytics tool. When no tv commercial aired within the detection window an HTTP 204 no content response is returned.


Parameter name

Description

Type

Note

customer

set wywy customer ID

integer

Mandatory

backend

set analytics tool

string

Mandatory

commercial

set commercial(s) to be tracked (filter)

integer(s), comma separated

optional

timeframe

set length of reporting after detection

integer

optional

mapping

set output configuration

integer

optional

slot

set tracking slot

integer

optional

scope

set tracking level

integer

optional

lifetime

set the length for which the user data is valid

integer

optional

version

used to differentiate between tag versions

integer

optional

objname

set the object name

string

optional

multi

return more than one result

boolean

optional


Implementing your analytics solution

All current web-analytics tools can be integrated easily. The analytics tool must support custom variables or custom data objects of some variation..


Google Universal Analytics (analytics.js) in combination with Google Tag Manager

Most Google Analytics users use it in combination with the Google Tag Manager. If you are using this combination, please follow the detailed step by step guide and ignore the instructions on Google Analytics and Google Tag Manager below.


Step by step guide

Click here to read our detailed step by step guide on Google Universal Analytics in combination with Google Tag Manager including screenshots.


Google Analytics: Universal Analytics/360 Suite (analytics.js)


Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

analytics

Universal Analytics

analytics

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300

slot

[1-20]

set dimension index; default 1

1


The dimension must be set and named in the Universal Analytics admin interface. We recommend naming the dimension wywyTvTracking and setting the scope to user.

The Plug-In Tag must placed after ga('create') and before ga('send') or the sent beacon will not contain the information. You must also close and open the script tags before inserting the Plug-In Tag.


Example output

ARD|Holiday_Special_20s|2013-12-20T20:04:56Z


Step by step guide

Click here to read our step by step guide for Google Universal Analytics (analytics.js) including screenshots. If you employ your Google Universal Analytics code via the Google Tag Manager, use the Google Universal Analytics & Google Tag Manager guide instead.


Google Tag Manager Data Layer

Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

gtm

Google Tag Manager

gtm

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300

mapping

[1-5]

set output; default: 4

4

objname

string

set dataLayer object name

dataLayer


The Plug-In pushes the relevant information to the Google Tag Manager Data Layer. The Plug-In Tag must be placed directly after opening the <body> tag and before the GTM tag.


Mapping variants output

Mapping

Event Name

Event Value

1-3

wywyTvKey
wywyTvValue

(see google analytics mapping)

4

wywyTvChannel

wywyTvCommercial

wywyTvTimestamp

wywyTvTracking

channel

commercialName

utc_datetime

channel|commercialName|utc_datetime

5

event

wywyTvChannel

wywyTvCommercial

wywyTvTimestamp

wywyTvTracking

wywyTvTracking

channel

commercialName

utc_datetime

channel|commercialName|utc_datetime


Step by step guide

Click here to read our step by step guide for Google Tag Manager including screenshots. If you employ your Google Universal Analytics code via the Google Tag Manager, use the Google Universal Analytics & Google Tag Manager guide instead.


Google Analytics: Old version (ga.js)


Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

ga

Google Analytics

ga

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300

mapping

[1-3]

set output; default 1

1

slot

[1-5]

set slot; default 1

1

scope

[1-3]

set scope: default 2

2


The Plug-In JavaScript Tag must be placed before the Google Analytics tag.

The Plug-In uses one of 5 custom variable slots, which then cannot be used for other purposes.

Mapping variants output

Mapping

Key

Value

1

commercialName

channel|utc_datetime

2

utc_datetime

channel|commercialName

3

channel

commercialName|utc_datetime

Example output

Key: Holiday_Special_20s

Value: ARD|2013-12-20T20:04:56Z


Step by step guide

Click here to read our step by step guide for Google Analytics (ga.js) including screenshots.


etracker

Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

et

etracker

et

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300


The plugin sets cc_attributes for cc_attributes["wtv"]. For the plugin to function a custom attribute needs to be declared in the campaign attributes settings in the etracker frontend. Please see the example below. The attribute name must be wtv.



The wywy script tag needs to be called after all other custom declarations, but right before the etracker tracklet is loaded.


Example output

ARD|Holiday_Special_20s|2013-12-20T20:04:56Z


Webtrekk


Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

wt

webtrekk

wt

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300

slot

[0-9]

set parameter id; default 1

1

objname

[A-z0-9]

set object name; default: wt

wt


The plugin adds the commercial airing data to a custom campaign parameter for the id specified in slot. For the plugin to function the custom campaign parameter needs to be declared in the account. Please see the example below. The data type should be 'Text' and number of values should be 'Single'.



The plugin must be added after setting wt but before calling wt.sendinfo().



Adobe Analytics

**NOTICE**

wywy offers a Data Connector App for Adobe Analytics. wywy strongly recommends using the Data Connector.


The below is for reference only and should not be used for new integrations.


Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

aa

adobe analytics

aa

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300

slot

[0-9]

set eVar; default: 1

1


The plugin adds the commercial airing data to an eVar for the id specified in 'slot'. For the plugin to function a conversion variable needs to be configured in the account. Please see the example below.



The plugin should be added after calling the adobe tag and right before calling s.t().



AT Internet


Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

at

at-internet

at

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300

mapping

[0-9]

set output; default: 1

1

lifetime

[0-9]

set cookie lifetime; default 30

30

version

[0-9]

set version; default 1

1

objname

[A-z0-9]

set object name

wywyxtcustom


The plugin works together with a separate .js-file provided by AT-Internet and hosted on the client’s website. The implementation should only be carried out together with a TAM from AT-Internet to make sure all configurations are accurate. The below is for reference only.



The plugin must be placed first. Next after the plugin the .js-file needs to be called. Only after this should any other AT-Internet related tracking code be placed.


Please note the object referenced in the tvtracking-js file provided by AT-Internet. Use the parameter objname to set if different from default wywyxtcustom.


Recognition Data Custom Integration

Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

wy

wywy recognition

wy

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300


Returned data (example)

var wywyrecognition = wywyrecognition || {};
wywyrecognition.time = '2013-12-20T20:04:56Z';
wywyrecognition.channel = 'ARD';
wywyrecognition.version = Holiday_Special_20s;


Recognition Data Custom Integration JSON

Parameter name

Value(s)

Use

Example

customer

[0-9]{6}

customer ID

123456

backend

json

wywy recognition JSON

json

commercial

[0-9]{7}

set commercial(s); default: all

1234567,1234568

timeframe

[0-9]

set time; default: 300 seconds

300

multi

true/false

return multiple results; default: false

true


Returned data (example)

{

 "time_utc": "2013-12-20T20:04:56Z",

 "channel": "ARD",

 "commercial_name": "Holiday_Special_20s",

 "commercial_id": 1234567,

 "customer_id": 123456

}


Bildschirmfoto 2015-08-14 um 12.51.53.png


[

 {

   "time_utc": "2015-08-14T10:43:47Z",

   "channel": "ARD",

   "commercial_name": "Holiday_Special_20s",

   "commercial_id": 1234567,

   "customer_id": 123456

 },

 {

   "time_utc": "2015-08-14T10:48:47Z",

   "channel": "ZDF",

   "commercial_name": "Holiday_Special_20s",

   "commercial_id": 1234567,

   "customer_id": 123456

 }

]

.