is now part of

Important: This is a step-by-step guide for Google Analytics using the deprecated ga.js code. For the new Universal Analytics code (analytics.js) or an integration via Google Tag Manager, please visit our wiki.


  • TV commercial airing and online campaign tracking: Basics
  • Step 1: Adding the TV Analytics Plugin to A Website
  • Step 2: Attribution for TV commercials
  • Step 3: Optimization of TV-campaigns using airing data in Google Analytics
  • Start tracking TV commercials and measure performance
  • The alternatives to Google Analytics: What, why, how
  • More information: How TV campaign tracking works


TV commercial airing and online campaign tracking: Basics

We have already covered what online TV campaign tracking is and why it is important. The wywy TV analytics plugin is a very simple, but still incredibly powerful way to enable an online in-depth analysis of TV commercial performance and the effect on your online KPIs. Once a commercial is added to the wywy system there are three data points provided for each airing:

  • Commercial name – the name of the commercial to tell different versions apart
  • Channel – the TV channel the commercial was detected on
  • Datetime – the exact time (UTC) of the detection

Before we start you should understand and be familiar with the following concepts:

  • Tracking with Google Analytics using ga.js (if you use analytics.js, click here)
  • Custom variables
  • Custom variale scope


Step 1: Adding the TV Analytics Plugin to a website

The first step is to set up the wywy TV Analytics Plugin. This guide explains how to add TV attribution to the standard Google Analytics version (check out our guide for Universal Analytics and Google Tag Manager as well). The plugin accesses the TV airing data information on our server. To access that information a script tag is included using the src attribute. The URL has three parts:

  • protcol
  • host
  • parameters

The protocol should be set to the same as the page it is located on. The wywy TV Analytics Plugin for Google Analytics supports both http:// and https://.

The host remains unchanged for all plugin versions and both supported protocols.

The parameters are where the TV commercial airing data output for Google Analytics can be configured.

There are two mandatory parameters:

  • customer
  • backend

The customer parameter tells our server which commercials to return data for and the backend parameter what type of analytics tool is being used. In our example the customer is ‘123456’ and the backend is ‘ga’ – Google Analytics. When setting up the tracking of your commercial for the first time we will provide you with your customer ID.

Users new to Google Analytics or advanced users not previously using custom variables are now ready to add the code to the website. It is very important that the plugin is placed before the Google Analytics code, as in the example below.

There are a number of ways to customize the way wywy TV airing data is gathered by and displayed in Google Analytics. There are three parameters that affect how TV commercial data is collected and displayed:

  • scope
  • slot
  • mapping

Users familiar with Google Analytics will note ‘scope’ and ‘slot’ (also known as index), which are used to define the behaviour of custom variables. These parameters and their values translate directly to Google Analytics (see custom variables documentation).

Scope sets the level the TV commercial data is stored at for a user. The default wywy TV Analytics Plugin setting, if not declared, is ‘2’ which is the session level. This makes a lot of sense if users generally convert on their first visit. In our e-commerce example we want to track the user for longer since we know it takes 3-4 visits for a user to make a purchase. Therefore, we set the scope to ‘1’ which associates the TV broadcast data with the user-level instead of the session-level.

Slot is used to define which custom variable slot, or index, is used. Google Analytics has 5 different slots numbered 1-5. In our example the e-commerce shop is already using the first slot to track if a user is a registered user or not, so we are going to tell the plugin to use slot ‘2’.

Mapping does not affect how the data is collected by Google Analytics, but rather how the information is accessible after processing. Custom variables are based on a key:value concept. These are two separate levels of information. By default the commercial name is placed in the ‘key’ and the secondary information datetime and channel are stored in the ‘value’. Mapping ‘1’,’2′, and ‘3’ set commercial name, channel and datetime as the ‘key’, respectively.

In our ecommerce example we are mostly interested in the channel performance. Since this is different from the default value we set the parameter mapping to ‘3’.

Step 2: Attribution for TV commercials

Google Analytics makes attribution very simple and does most of the heavy lifting. With TV data in your analytics account it is possible to take the baseline reading of traffic and calculate the uplift that should be attributed to TV.

In the channels view of Google Analytics you can see a breakdown for all visits and transactions by channel.

We can add our TV data as a segment to this view.

Looking at the table view this shows us how different channels, in our e-commerce example direct and organic search traffic, see a strong uplift during a TV commercial airing:

We can also see that some channels in our e-commerce example are not affected at all by a TV commercial airing.

Using this data you can calculate the distribution weight for your attribution model.


Step 3: Optimization of TV-campaigns using airing data in Google Analytics

In addition to allowing for an accurate attribution model including the TV-data for transactions and conversions Google Analytics can be used to optimize a TV campaign based on website actions and transactions. There are several different ways of viewing and analyzing the spot level data in Google Analytics, from custom reports, to conversion or e-commerce report, adding an advanced segment to almost any view or even applying a secondary dimension.

The most comfortable way of viewing and comparing TV analytics metrics is a custom report using the dimensions important for your business and marketing campaign.


The alternatives to Google Analytics: What, why, how

As Google Analytics does not have a standardized TV attribution module, the above solution only gives you a good understanding on how TV-inspired traffic compares to “regular” traffic. One of the major shortcomings is that it does not allow you to calculate a baseline and thereby identify how much traffic comes from TV directly. In addition, the standard Google Analytics solution aggregates the traffic data to an hourly level (and you usually have multiple commercials running per hour), making it almost impossible to compare which TV channel and TV creative work best. Our white paper on TV attribution explains this in detail.

There are two ways to analyze the TV advertising’s effect: First, Google Analytics Premium allows you to download the log level traffic data. As this data is not aggregated, you can then do your manual analysis by marrying log level data with the TV airing schedules. Second, specialized TV attribution vendors offer TV Analytics solutions – wywy being one of them.


Start tracking TV commercials and measure performance

We are happy to get you set up and track your commercial broadcasts in real time.
Reach out to us today.

[CBC country=”de,at,ch” show=”y”]
Your contact for Germany, Austria & Switzerland: (other countries)
Melanie Eckl


[CBC country=”us,ca” show=”y”]
Your contact for the US & Canada: (other countries)
Victor Castello


[CBC country=”uk,gb” show=”y”]
Your contact in the UK: (other countries)
Melanie Eckl


[CBC country=”fr” show=”y”]
Your contact in France: (other countries)
Melanie Eckl


[CBC country=”it” show=”y”]
Your contact in Italy: (other countries)
Melanie Eckl


[CBC country=”tr” show=”y”]
Your contact in Turkey: (other countries)
Melanie Eckl



More information:
The product: TV Analytics Plugin

How TV campaign tracking works

TV Analytics study: Audibene identifies TV plan’s optimization potential


TV Analytics study: Experteer identifies best performing TV airing slots