Working with Landing Pages

How to set up landing pages rotation?

  1. Create a campaign. Choose “Random” at “Stream/Banner Selection Mode”
  2. Create a stream for each landing page.

If your traffic is from advertising networks

  1. Open the “Integration Assistant” page;
  2. Find your advertising network and connect the Keitaro campaign to an advertising campaign according to the instructions.

Otherwise, just copy the campaign URL, button “Campaign URL”

How to send the conversion from your landing pages?

You need to send the parameter subid to a landing page. When a customer make an order the postback will be send back to Keitaro with the same subid.

1. Pass subid in the stream. For example, http://landing.ru/?subid={subid}.

2. Catch subid at the landing page and store it in session. For example,

<?php 
start_session();
if (!empty($_GET['subid'])) {
  $_SESSION['subid'] = $_GET['subid'];
}
?> 

3. Copy URL for sending postbacks at the page of your campaign.

4. When a customer make an order send the postback. For example,

<?php
file_get_contents('http://tds.com/xxxx/postback?subid=' . $_SESSION['subid']. '&profit=1.23&status=sale');
?>

How to send rebills from landing pages?

You need to send different values of tid (transaction id) and then Keitaro will receive multiple conversions with the same subid:

<?php
file_get_contents('http://tds.com/xxxx/postback?subid=' . $_SESSION['subid']. '&profit=1.23&status=sale&tid=1');
...
file_get_contents('http://tds.com/xxxx/postback?subid=' . $_SESSION['subid']. '&profit=1.23&status=sale&tid=2');
?>

How to transfer all the parameters through a landing or prelanding page?

Solution on PHP:

<a href="http://offer.com/?id=123&<?= http_build_query($_GET) ?>">URL</a>

Solution on JS:

<script>document.write('<a href="http://offer.com/?affid=123&' + window.location.search.replace('?', '') + '">URL</a>'</script>

How to use information about visitors on the landing page?

Solution for workflow when traffic goes to the TDS first and then to the landing page. On the landing page you can use the information from TDS, for example, device model.

Modify streams and pass parameters. For example:

http://landing.com/page?model={device_model}&city={city:ru}&subid={subid}

(You can see the list of macros here - Macros)

Now on the landing page use the information that was received:

<html>
  <head>
     <script type="text/javascript">
       function getURLParameter(name) {
           return decodeURI(
               (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
           );
       }
       </script>
  </head>
<body>
  Mobile covers <script>document.write(getURLParameter('model'))</script> 
  in the city <script>document.write(getURLParameter('city'))</script>
</body>
</html>

How to pass data from a prelanding to a landing page of an affiliate network?

You need to pass subid from TDS to the offer.

Set up passing subid at a stream:

http://mylanding.com/?subid={subid}

On the prelanding page modify the offer URL to pass subid:

<html>
  <head>
     <script type="text/javascript">
       function getURLParameter(name) {
           return decodeURI(
               (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
           );
       }
       </script>
</head>
<body>
    <script>document.write('<a href="http://offer.com/?affid=123&aff_sub=' + getURLParameter('subid') + '">Offer</a>')</script>
</body>
</html>

A parameter name of each affiliate network for passing subid is different. Please see the documentation on the web site of affiliate network .

What to do if prelanding or landing page is static html?

You need to connect the js-script of Keitaro tracking.

  1. Open the “Integration Assistant” page;
  2. Choose “Other > Tracking code”;
  3. Place the code at your landing page;
  4. Pass subid at the streams. For example, http://landing.com/?subid={subid}.
  5. To send conversion data call the js-code: KTracking.reportConversion(100, 'sale'). Read the tracking script instruction at the page Tracking code.

How to collect visitors and conversions from landing page without sending to TDS?

  1. Create a campaign, choose the “Tracking” type;
  2. Follow the instructions and connect the tracking code to your landing page;
  3. To track the conversion set up passing subid in URLs of the offers.