Optimise Tracking tags can easily be added to Google Tag Manager. This article assumes you have a basic understanding of Google Tag Manager Data Layer variables.

Login to your Google Tag Manager account and follow the steps below.

Adding the Sale/Transaction Tag

Optimise is integrated directly into Google Tag Manager.

When selecting your Tag Type choose more > Optimise Conversion Tag as illustrated below.



Complete the requested values with those provided by your account manager:


Add the tag manually

1. Click on Container > Tags


2. Click “New” to create a new tag


3. Choose “Custom HTML Tag”

i. Add a name for your tag such as “Optimise Sale Tag”
ii. Create a Custom tag


4. Copy and paste in tag provided to you by your Account Manager

i. Copy and paste in the tag provided
ii. You will need to replace the current placeholders with the associated DataLayer Variable names you have created in Google Tag Manager. eg. AppID={{SaleReference}} and Status={{SaleValue}}. If you don’t have any DataLayer variables jump to this section.

See example below (note the below tag is an example only, you must use the tag provided by your Account Manager) :

Note: If GTM tags are being used to host  affiliate JS tags , it may be necessary to enable document.write in GTM. For further information see Custom Tag Types

5. Select the Events to fire the tag

Select the “Some Pages” option


You will then need to choose the variable which fires the tag. If you have not already created a variable then we recommend creating a First Party Cookie variable named “SaleAttribution” (see example below).


6. Choose a Publish option to complete the changes


7. Adding Data Layer Variables

To understand more about the Data Layer click here.

Add the following JavaScript to your page just above your Google Tag Manager JavaScript replacing the values as appropriate:

dataLayer =[{

You should then create the variables from the Data Layer within Google Tag Manager so they are accessible:


Once the variable has been created you can reference it in your Tags through a macro format like: {{SaleReference}}

See Also: Using Conditional Tracking With Google Tag Manager

We also recommend installing the Google Tag Assistant extension to ensure you Tag Manager is properly configured and to view the DataLayer.