PeerClick Documentation

PEERCLICK Help Center

Welcome to the PEERCLICK Help Center. You'll find comprehensive guides and documentation to help you start working with the PeerClick Tracker as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Displaying PeerClick Parameters on a Landing Page (Dynamic Call-Outs)

You can use PeerClick data such as a device and geo of the visitor inside your landing page, for example, by inserting a headline: "Hello iPhone user" or "Hello Samsung user". To do this, you need to use a dynamic call-out script.

A dynamic call-out script that is placed within a landing page enables a page’s content to be dynamically updated with data which is uniquely attributed to each visitor. Dynamic call-out scripts are optional and can be used on the landing pages if only you need such configuration.

For data to be dynamically injected within a landing page, it first needs to be passed to the page by the addition of the desired tokens within the lander URL’s string.

Example:

For the purpose of this guide, let's take as an example the landing page URL prepared in the previous articles:
http://lander_url.com/?m1={model}&domain={trackingdomain}

  • To call-out the model data within your landing page, you appended the m1 parameter with the corresponding token to the lander URL.
  • Additionally, you used the domain parameter to dynamically pass the information about the domain used in the campaign funnel:

Once you have defined the landing page's URL appropriately, you need to set your landing page with an adequate piece of code.

PASTE THE SCRIPT TO THE LANDING PAGE

Below is an example landing page containing a script that adds the model value, m1, dynamically into the page.

<html>
<head>
<script>
function getURLParameter(name) {  
var query = window.location.search.substring(1);  
var vars = query.split("&");  
for (var i=0;i<vars.length;i++) {  
var pair = vars[i].split("=");  
if(pair[0] === name){return pair[1];}  
}  
return "";
}
</script>
</head>

<body>
Hello <script>document.write(getURLParameter('m1'))</script> user, you just won!
</body>
</html>

where:

  • The script function must be placed into the <head> section of your landing page source code.

PeerClick Note

If you have already defined the getURLParameter() function as described in the Adding Click URLs on a Landing Page Used in Different Funnels article, you do not need to add the function again. In this case, it is enough when you add only the part from the <body> section.

  • The call-out section of the script should be placed into the <body> section of your landing page source code.

PeerClick Note

The parameter included in the <body> section needs to match the parameters used in the lander URL’s query string.

Example:

For example, instead of m1, you could use the s1 parameter:

http://lander_url.com/?s1={model}&domain={trackingdomain}

The the <body> section needs to be updated to match the parameters sent:

<body>
Hello <script>document.write(getURLParameter('s1'))</script> user, you just won!
</body>

It’s best to place the script within your landing page and test it before sending live traffic.

Once you’ve placed your script and tested the landing page with static values, you can add your landing page to PeerClick.

Displaying PeerClick Parameters on a Landing Page (Dynamic Call-Outs)


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.