Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the...

20
Conversion Tracking Implementation Guide Communicator Conversion Tracking Implementation Guide | February 2017 Version 1.0 A guide to implementing conversion tracking on your website covering a standard setup as well as using Google Tag Manager.

Transcript of Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the...

Page 1: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide

Communicator Conversion Tracking Implementation Guide |

February 2017 Version 1.0

A guide to implementing conversion tracking on your website covering a

standard setup as well as using Google Tag Manager.

Page 2: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 2 of 20 February 2017

Contents

Contents ........................................................................................................................................................... 2

Conversion Tracking .................................................................................................................................. 4

What is conversion tracking? .................................................................................... 4

Benefits ........................................................................................................................... 4

Requirements ................................................................................................................ 4

How it works ................................................................................................................................. 5

The Setup .................................................................................................................................. 5

Standard Setup ............................................................................................................................................. 6

Figure 1 Inbound Tracking Script To be placed on your website .................... 6

Figure 2 Purchase tracking script To be inserted on your website ................ 6

Figure 3 Download tracking script To be inserted on your website .............. 7

Figure 4 Form completion tracking script To be inserted on your website . 7

Conversion Tracking Code Examples .............................................................................................. 8

Purchase Conversion Tracking Code Examples .................................................... 8

Figure 5 Purchase Conversion Tracking Script - Example 1 ................................ 8

Figure 6 Purchase Conversion Tracking Script - Example 2 ............................... 8 Download Conversion Tracking Code Examples .................................................................. 9

Figure 7 Download Conversion Tracking Script - Example 1 .............................. 9

Figure 8 Download Conversion Tracking Script - Example 2.............................. 9

Form Completion Conversion Tracking Code Examples .................................................. 10

Figure 9 Form Conversion Tracking Script - Example 1 ..................................... 10

Figure 10 Form Conversion Tracking Script - Example 2 ................................... 10

Google Tag Manager Setup ................................................................................................................... 11

Installing Tag Manager ............................................................................................. 11

Setting Up Tags .......................................................................................................... 11

Inbound Tag ............................................................................................................................... 11

Figure 11 Inbound Tracking Script To be inserted into Tag Configuration .. 12

Submission Tag and Variables ................................................................................ 12

Figure 12 Data Layer Set Up Script To be inserted on your website ............ 13

Figure 13 Populate Data Layer Script To be inserted on your website (E.g.

on Order Confirmation page) ..................................................................................... 13

Figure 14 Submission Tracking Script To be inserted into Tag Configuration

........................................................................................................................................... 14 Publishing.................................................................................................................................... 15

Testing .......................................................................................................................... 15

Troubleshooting ......................................................................................................... 15

Cookie Creation .......................................................................................................... 15

Firing Tags ................................................................................................................... 15

Tag Assistant ............................................................................................................... 16

Page 3: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 3 of 20 February 2017

Further Help ............................................................................................................................... 16

JavaScript Variable Reference ............................................................................................................ 17

Table 1 Configuration Values ................................................................................... 17 Table 2 Data Variables .............................................................................................. 18

Conversion Tracking Security ........................................................................................................... 20

Page 4: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 4 of 20 February 2017

Conversion Tracking What is conversion tracking?

Conversion tracking allows you to accurately measure the results of your email

campaign by tracking recipient behaviour from the inbox to your website.

of files

or the completion of a form.

Benefits

Track and measure transactions, products sold, form completions and

downloads

Understand the real success of your campaigns

Discover what actions your recipient completes after clicking on a link

Justify your email campaigns

Identify follow-through activity

Measure interest

Conversion tracking allows for the reporting of activities that occur outside of

Communicator and are the direct result of an email campaign and help to measure

success.

Requirements

To get conversion tracking to work successfully there are two main parts:

Conversion Tracking will only work on dispatches from Communicator that

have link tracking enabled. This is an option during the dispatch process.

Page 5: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 5 of 20 February 2017

The target website must have our Conversion Tracking code implemented

on it. You will require your client ID during the setup of the tracking code, to

get yours contact the Communicator Support Team on 0844 870 8974 or

[email protected].

How it works

When a user clicks a tracked link in an email sent from Communicator they are first

directed back to our servers.

We then lookup where the link originally pointed to and redirect the user to that

URL with an additional value on the query string. That value helps us to uniquely

identify the user and the specific campaign that they received.

The additional tracking value is then captured by the target website and stored in

a cookie so that it can be sent back to Communicator when the user completes the

desired action.

The Setup

To set up conversion tracking we recommend one of two ways, a standard setup

or using Google Tag Manager.

You only need to use one of these two options to setup conversion tracking.

Page 6: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 6 of 20 February 2017

Standard Setup To manually hook Conversion Tracking into your website, two snippets of code

must be added to the relevant pages. These script blocks can be inserted

anywhere between the opening and closing <body> tags.

Figure 1 below shows the code to be added to all inbound pages. An inbound page

is a page on the target website that was linked to from an email in Communicator.

This script stores the tracking value passed in the query string.

As an alternative to adding this script on each individual inbound page, this could

be added on the global template of your website.

Figure 1 Inbound Tracking Script To be placed on your website

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/javascript"></script>

<script type="text/javascript">

cc_Duration = 10; /* Default is 30 days if omitted*/

/* ... Set other variables here if required (see documentation)*/

ProcessInbound();

</script>

Figure 2, 3 and 4 below show the 3 different tracking scripts available (Purchase,

Download and Form Completion). The relevant script must be added to the pages

from which you'd like to track conversions in order for this to be sent back to

Communicator. Take care to ensure you use the correct snippet for the type of

Conversion Tracking you wish to use.

A table of possible parameters can be found in the JavaScript Variable Reference

section later in the document. Client ID must be supplied at all times and tracking

will not work if it is omitted.

Figure 2 Purchase tracking script To be inserted on your website

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = <Insert your Client ID here>;

cc_Amount = <Insert the conversion amount here>;

/* ... Set other variables here if required (see documentation)*/

ProcessPConversion();

</script>

Page 7: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 7 of 20 February 2017

Figure 3 Download tracking script To be inserted on your website

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = <Insert your Client ID here>;

/* ... Set other variables here if required (see documentation)*/

ProcessDConversion();

</script>

Figure 4 Form completion tracking script To be inserted on your website

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = <Insert your Client ID here>;

/* ... Set other variables here if required (see documentation)*/

ProcessFConversion();

</script>

Page 8: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 8 of 20 February 2017

Conversion Tracking Code Examples Purchase Conversion Tracking Code Examples

The below example uses the Purchase Conversion Tracking script and will submit a

value of EUR 9.69 with a reference ID of 52289 to Communicator. Throughout

these examples the values used on the right should be programmatically inserted

by your website i.e. through a reference to a variable which holds the required

value.

Figure 5 Purchase Conversion Tracking Script - Example 1

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = 1234;

cc_Amount = 9.69;

cc_Currency = "EUR"

cc_ReferenceId = "52289"

ProcessPConversion();

</script>

The next example uses the Purchase Conversion Tracking script and will submit a

value of GBP 14.32. GBP is the default currency and used automatically even

description of Running Shoes and a reference ID of 8599778:

Figure 6 Purchase Conversion Tracking Script - Example 2

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = 6552;

cc_Amount = 14.32;

cc_ReferenceId = "8599778"

cc_Category = "footwear"

cc_Description = "Running Shoes"

ProcessPConversion();

</script>

Should many references, categories or descriptions be passed to Communicator,

we recommend surrounding the entire string in quotes with a comma between

each value.

Page 9: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 9 of 20 February 2017

Download Conversion Tracking Code Examples

The two examples below show the Download Conversion Tracking script with

different values:

Figure 7 Download Conversion Tracking Script - Example 1

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = 91335;

cc_Category = "Webinar"

cc_Description = "How To Increase Subscriber Numbers Video"

/* ... Set other variables here if required (see documentation)*/

ProcessDConversion();

</script>

Figure 8 Download Conversion Tracking Script - Example 2

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = 1668;

cc_Category = "Winter Offers Brochure"

cc_Description = "Winter Offer Brochure with £10 voucher inside"

ProcessDConversion();

</script>

Page 10: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 10 of 20 February 2017

Form Completion Conversion Tracking Code Examples

The two examples below show the Form Completion Conversion Tracking script

with different values:

Figure 9 Form Conversion Tracking Script - Example 1

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = 1591;

cc_Category = "Social Media Event"

cc_Description = "How to attract more customers using social media"

ProcessFConversion();

</script>

Figure 10 Form Conversion Tracking Script - Example 2

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = 1355;

cc_Category = "Benchmark Document Download"

cc_Description = "January to June 2012 benchmark satistics"

ProcessFConversion();

</script>

Page 11: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 11 of 20 February 2017

Google Tag Manager Setup To get Tag Manager to work it requires the inclusion of a code snippet on your

website, therefore the help of a developer may be required. Further developer

assistance may also be required to push the data from the website into Tag

Manager.

Once setup this data will then be available to all future integrations and tags.

To get Tag Manager and Communicator working together there are two main

steps, getting Tag Manager installed on your website and setting up

Communicator tags within Tag Manager.

You can sign up to Tag Manager for free here.

Installing Tag Manager

Before setting up tags in Tag Manager you will need a container for your website, a

container holds all of the different tags for the website. If you do not have one

already, click the three dots to expand the

context menu for the specific account and select

be asked to give your Container a name and choose the platform you will be using.

Tag Manager will then give you two snippets of code that must be added to every

page of your website. The first snippet must go as high in the <head> of the page

as possible. The second snippet must go immediately after the opening <body>

tag.

Setting Up Tags

tracking to work. The first will be included on inbound pages on your website to

begin the conversion tracking process; the second will be included on the page

representing a target or goal, typically the final confirmation page in a checkout

process.

Inbound Tag

The first tag required is the tag that starts the conversion tracking process. This is

required on each page that could be included as a link in a Communicator email. In

most scenarios this is included on every page on the website. To create the

inbound tag, follow these steps:

Page 12: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 12 of 20 February 2017

1. In Tag Manager navigate to the container workspace for your website

2.

3. tor Conversion Tracking

4.

5. Enter the inbound script into the HTML box. Example code is shown below.

Figure 11 Inbound Tracking Script To be inserted into Tag Configuration

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/javascript"></script>

<script type="text/javascript">

ProcessInbound();

</script>

6.

created. If the tag should only be included on certain pages then create a

custom rule with the relevant conditions.

7.

Submission Tag and Variables

The second tag required is the one that submits a conversion, whether it is a

purchase, download or form completion. This would normally be included on the

confirmation page following the successful completion of one of the actions.

The submission tag is more complicated to configure, due to the fact that dynamic

data from the website needs to be passed back to Tag Manager and

Communicator. For each value that needs to be passed back to Communicator

(e.g. order amount, order reference or currency) you will need a variable in Tag

Manager. To create a variable, follow these steps:

1. In Tag Manager navigate to the container workspace for your website

2. -side menu

3. -

4.

Page 13: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 13 of 20 February 2017

5. Under Var

type

6. Give a name for the Data Layer Variable. We recommend using the same

name from Step 4. This name will be used to reference the variable from

your website.

7.

Repeat this process to create each value that needs to be passed back to

Communicator. You may wish to create a variable for all of the following values

now for future use:

Amount

Currency

Reference ID

Category

Description

Once all required variables are set up they need to be populated with data from

your website. The following instructions assume you are using data layer variables

as per our recommendations.

The first step is to ensure that a data layer has been set up on your website by

including the following snippet above the container snippet on every page of your

website.

Figure 12 Data Layer Set Up Script To be inserted on your website

<script type="text/javascript">

dataLayer = [];

</script>

The next step is to populate the data layer in Tag Manager with values from your

website, the below snippet shows an example of how this can be done. Each value

on the left hand side must match the name of the relevant Data Layer Variable

(Refer to Step 6 of this section). The value on the right should be

programmatically inserted by your website and the snippet should again be above

the main container snippet.

Figure 13 Populate Data Layer Script To be inserted on your website (E.g. on Order Confirmation page)

Page 14: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 14 of 20 February 2017

<script type="text/javascript">

dataLayer.push({

'Order Reference': 'ABCD1234',

'Order Amount': 49.99

});</script>

After setting up the data layer the submission tag can be created. To create the

submission tag, follow these steps:

1. In Tag Manager navigate to the container workspace for your website

2. Click

3.

4.

5. Enter the submission script into the HTML box. Example code is shown

below for a purchase conversion, for more in depth options please refer to

the JavaScript Variable Reference section later in this document. Please

ensure your unique client ID is used or conversion will not be attributed to

your dispatches. Each value on the left hand side must match the name of a

Communicator conversion tracking variable. The value on the right should

be the name of the relevant variable surrounded in double curly brackets

Figure 14 Submission Tracking Script To be inserted into Tag Configuration

<script src="//az692189.vo.msecnd.net/scrpt/ct.js"

type="text/JavaScript"></script>

<script type="text/JavaScript">

cc_ClientId = 1234;

cc_Amount = {{Order Amount}};

cc_ReferenceId = {{Order Reference}}

ProcessPConversion();

</script>

6. Under Triggering, click on the icon to choose a trigger and then select the

new firing rule. At least one rule will have to be setup

to get the tag to fire. If the tag should only be included on certain pages

then create a custom rule with the relevant conditions.

For example, if the rule is to fire on an order confirmation page then create

a rule where the URL contains the order confirmation page. Take care to

ensure that no other URLs within your website unexpectedly match the rule.

Page 15: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 15 of 20 February 2017

7.

Publishing

Once both the inbound and submission tags have been created the container

needs publishing to make those changes live on your website. Click on Publish and

then define the version information and click Publish again.

Testing

Once published the conversion tracking integration can be tested by following a

link to your website from an email dispatched from Communicator. The dispatch

must have conversion tracking enabled. After submitting a conversion, it can take

a few minutes to appear within the dispatch statistics in Communicator.

Troubleshooting

If the conversion is not showing within Communicator, then use the information

below to try and find out why.

Cookie Creation

The first step is to ensure that the conversion tracking cookie is being created

correctly. To do this, follow a link from an email dispatched from Communicator

with conversion tracking enabled. Then, in your browser settings look for a cookie

If no cookie exists with this name then this would indicate that Google Tag

Manager is not included on the we

enabled on the dispatch or the inbound script is setup incorrectly.

Firing Tags

The next step is to ensure that the relevant tag in Tag Manager is firing on the

correct pages. To do this, within the container workspace in Tag Manager click on

message should be displayed confirming that you are now previewing the

workspace and that debug mode is enabled.

Follow a link in an email dispatched from Communicator with conversion tracking

enabled. You should now see a message displayed indicating the inbound

conversion tracking tag has fired.

Page 16: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 16 of 20 February 2017

If no message is displayed, then this would indicate that Google Tag Manager is

not included on the website correctly. If a message is displayed indicating that the

tag was not fired, then this would indicate that the rules for that tag are incorrect.

Continue on the website to complete the conversion process and a message

should be displayed indicating that the submission tag has fired.

If no message is displayed, then this would indicate that Google Tag Manager is

not included on the website correctly. If a message is displayed indicating that the

tag was not fired, then this would indicate that the rules for that tag are incorrect.

Tag Assistant

If both tags successfully fire but the conversion is still not showing in

Communicator, then this would indicate the submission tag is not setup correctly.

Google provide an extension for Google Chrome called Tag Assistant that can be

used to inspect the tags from Tag Manager on a page and the data in the data

layer. Simply install the extension, complete the conversion process and open Tag

Assistant to view the data that is available on that page.

If the relevant data is not showing this would indicate a problem with populating

the data layer. If the data is showing, then this would indicate a problem with using

the variables within the submission tag.

Further Help

If you require further help please contact the Communicator support team,

providing as much detailed information as possible. To assist further, the ability to

submit a test conversion and read only access to Tag Manager may be required.

Page 17: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 17 of 20 February 2017

JavaScript Variable Reference Table 1 below lists the configuration variables for the client-side code. These

variables can be inserted above the call to the tracking function to help match

your requirements.

Table 1 Configuration Values

Variable Description Details Requirement

cc_Duration Sets the expiration of the

tracking cookie in days from the

current time. Default is 30 days.

Must be called on the Inbound

tracking page.

The value

should not be

surrounded

with quotes.

All

Conversions

(optional)

cc_DebugMode Setting this value to true

enables alerts to display during

the tracking process.

Can help with debugging.

Must be either true or false,

default is false.

Values must

be in lower

case.

The value

should not be

surrounded

with quotes.

All

Conversions

(optional)

cc_CrossDomain Cross sub domain conversion

tracking is possible by simply

setting the cc_CrossDomain

variable. e.g. cc_CrossDomain =

This functionality is useful for

those clients who have a thank

you page on a separate sub

domain to their inbound landing

page. For example, you may

have an inbound script on

http://shop.mysite.com and a

Please

remember the

full stop

before the

domain.

Ensure the

value is

surrounded

with quotes.

All

Conversions

(optional)

Page 18: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 18 of 20 February 2017

Variable Description Details Requirement

thank you page on

http://buy.mysite.com.

Note: You are unable to use

conversion tracking on entirely

separate domains. This will only

work on different sub domains

only.

Table 2 lists the available data variables. Some are required for specific types of

tracking where others are optional and can be used to enhance the data that is

captured.

cc_ClientId is required for all tracking and must be supplied for tracking to work.

Table 2 Data Variables

Variable Description Details Requirement

cc_ClientId Your unique Client ID. Integer value.

Should not be

surrounded

with quotes

All

Conversions

(required)

cc_Amount Specifies an amount in a

purchase conversion and

should not include currency

symbols

e.g. cc_Amount = 30.99.

Decimal

value.

Should not be

surrounded

with quotes.

Purchase

Conversion

(required)

cc_Currency Specifies the currency in a

purchase conversion.

Default is GBP.

Should be

surrounded

with quotes. 3

characters

max.

Purchase

Conversion

(required)

Page 19: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 19 of 20 February 2017

Variable Description Details Requirement

cc_ReferenceId Allows a reference number to

be assigned to the tracking, an

Order ID for example.

e.g. cc_ReferenceId =

Text or

numeric

values.

256

characters

max.

This value

should be

surrounded

with quotes.

All

Conversions

(optional

although

advised)

cc_Category Allows a category to be

assigned to the tracking.

Text or

numeric

values.

256

characters

max.

This value

should be

surrounded

with quotes.

All

Conversions

(optional)

cc_Description Allows a description to be

assigned to the tracking.

Text or

numeric

values. 1024

characters

max.

This value

should be

surrounded

with quotes.

All

Conversions

(optional)

Page 20: Conversion Tracking Implementation Guide - Communicator€¦ · Conversion tracking allows for the reporting of activities that occur outside of Communicator and are the direct result

Conversion Tracking Implementation Guide Page 20 of 20 February 2017

Conversion Tracking Security Every effort has been made to make our Conversion Tracking as secure as

possible. Because the client ID has the potential to be viewed by others it is also

stored within the encrypted tracking value and then compared to ensure only

legitimate conversions are tracked.

happen if a user refreshes the page with the Conversion Tracking code on (such as

a purchase confirmation page). The result is that no duplicate entries are recorded

within a 4-minute period.

For further help, information and guidance please contact the Communicator

Support Team on 0844 870 8974 or via [email protected].