Pagetag

Convert Network can also attribute clicks to users arriving on Partner sites from Google or Bing adverts. This information can help Partners record actual conversions against their campaigns.

# Supported

We currently support:

  • Google gclid
  • Bing msclkid

# Lifecycle

Step Description
1 Customer clicks on Google/Bing advert
2 Customer lands on Partner site with a gclid or msclkid in the URL
3 Convert Network JavaScript code reads the ID and appends it to links that go through Convert Network
4 Convert Network records the click with the associated advert ID
5 Customer purchases a product on an advertiser site and the transaction is recorded by Convert Network
6 Convert Network can attribute this conversion to the advert the click originated from
7 Convert Network uploads this information as conversions to the relevant advert provider

# ID Tracking

Convert Network provides JavaScript front end code to match advert IDs to the clicks that they generate.

Partners can load https://perform.convertnetwork.com/js/pagetag/v1.js onto their landing pages and the code will automatically create a first-party cookie on their domain containing gclids and/or msclkids.

If the page containing your links is server generated then the code will be able to find them when it runs.

If you use a JavaScript app that loads and displays the links dynamically then you will have to tell the JavaScript code when these links have loaded so that they can be decorated.

The JavaScript code adds a new object to the window which you can call with:

window.PageTag.run();

The JavaScript code will automatically append advert IDs to any links to Convert so that we can record this data against the click. All you need to do is load the code onto your page and we will do the rest.

Load the JavaScript library before the close body tag

<script src="https://perform.convertnetwork.com/js/pagetag/v1.js" defer></script>

Many partner sites link to an internal system that provides analytics to the partner and then redirects the user to Convert Network to record the click. For these sites the JavaScript code will need to know which links it needs to decorate.

You can do this by providing configuration to the Convert Network JavaScript code before it is loaded so that it knows what these links look like. When the JavaScript code runs it will look for any URLs that contain the URL you have provided and decorate them accordingly.

Your internal system must pass this information on to Convert Network when the user is redirected to us. This will involve a change to your internal system.

A PHP example has been provided to demonstrate that:

  • a pagetag parameter is appended to each link
  • your system must retrieve this as a GET parameter from the URL
  • your system must append this to the URL it returns to the user when they are redirected to Convert Network
  • Convert Network reads this information and stores it with the click

Customising the links that will be decorated

<script>
var Convert = {
  url: 'https://partner-site.com/go/'
}
</script>
<script src="https://perform.convertnetwork.com/js/pagetag/v1.js" defer></script>

Forwarding the pagetag parameter in PHP

$convertUrl = 'https://perform.convertnetwork.com/redirect?destination_url=https://advertiser.com/product-1';
$convertPageTag = '';

if (isset($_GET['pagetag'])) {
  $convertPageTag = $_GET['pagetag'];
}

return redirect($convertUrl . '&pagetag=' . $convertPageTag);

# Data retrieval

If you would like a copy of your clicks and/or transactions with their associated advert IDs please speak to your Convert Network technical contact.