# Landing Pages FAQ

# How to identify a problem with a landing page

Open your browser’s console Developer Tools and check the errors.

# Why doesn't the landing page downloaded from the affiliate program redirect to my offers?

Many landing pages contain a secure JS-script that replaces all links with the original ones. Try to click your campaign link and check the path to the landing page and the offer. Hover your cursor over the link and make sure it leads to the tracker.

# How to send parameters to FB pixel

An example of the code for local and preloaded landing pages:

// Insert Your Facebook Pixel ID below. 
fbq('init', 'FB_PIXEL_ID');
fbq('track', 'view', {
   subid: '{subid}'   

# How to make limits for uploaded archives of local landing pages files bigger

The size of an uploaded archive is limited within some PHP and nginx directories:

  1. upload_max_filesize in php.ini
  2. post_max_size in php.ini
  3. client_max_body_size in nginx.conf

# How to send a lead from a landing page without a tracking script

You'll need to follow the next steps:

  1. send a subid to a landing page;
  2. get a subid on a landing page and save it to a session;
  3. send a postback when the order is completed.

Detailed description:

  1. Add a subid transfering inside a stream, e.g., http://landing.com/?subid={subid}.

  2. Add saving subid into a session on a landing page (add this code on all pages, if there are some of them):

if (!empty($_GET['subid'])) {
  $_SESSION['subid'] = $_GET['subid'];
  1. Add an affiliate network on an «Affiliate Networks» page. Fill in any name, e.g. Collecting Contacts. Use a basic postback.

  2. After the order is completed, send a postback:

file_get_contents('http://domain.com/123/postback?subid=' . $_SESSION['subid']. '&payour=1.23&status=sale');

Change http://domain.com/123/postback to your basic postback. Read more about postbacks on a Postbacks page.

# How to transfer all parameters through a landing page

All parameters are added to an offer URL if you use a “Landings and Offers” scheme. Below is the solution when you use a static link on a landing page.

Solution on PHP:

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

Solution on JS:

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

# How to transfer parameters if there's an order form on a landing page

Add transferring parameters into the order form code, e.g. ёsubid1ё is transferred the following way:

<input type="hidden" name="sub1" value="<?php echo urlencode($_GET['sub1']);?>">

You must add parameter &exit=1 to offer links. That will ignore these clicks from metrics LP Clicks, LP CTR, etc. Example with using {offer}:

<a href="{offer}&exit=1">Offer</a>

# Why doesn't the smooth scrolling work?

The scrolling can be configured through anchors. For example, <a href="#order">. When baseHref is used, anchors stop working and become links.

Therefore Keitaro replaces anchors with the following js code: onclick = "document.location.hash = 'order0'; return false;". This breaks the smooth

scrolling, but leaves the anchors working.

# How to fix a smooth scroll

Find the JS code of a function or a method which uses $('html, body').animate({…});

ANIMATE is a built-it JQuery library method.This method executes animation.

It is used in a selector.click() or selector.on('touch, click)and looks like the following:

selector.click(function() { $('html, body').animate(positionSelector , timeAnimate); })

We need to find the mentioned selector.

Usually this is the link with the class, e.g.: <a class=”to_form” href=”#”>link</a>

We need to change all the links.

Add a span tag, add the class to the tag delete class and href link attributes.

The final code for the smooth scroll will look like this:

<span class="to_form"><a>link</a></span>

# How to write click’s data to PHP

Use rawClick:


# How to insert a subid and other info on a landing page with a redirect

The solution works only if traffic first goes to Keitaro and a landing page works with a “redirect” type. If you use “Preload” feature, read the following park of our documentation.

Edit the landing page settings. Ad necessary parameters and macros to Landing page URL:


Received parameters can now be inserted to a landing page:

     <script type="text/javascript">
       function getURLParameter(name) {
           return decodeURI(
               (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
  Cases for mobile phones <script>document.write(getURLParameter('model'))</script>
  In a city of <script>document.write(getURLParameter('city'))</script>

Or on PHP:

  Cases for mobile phones <?php echo htmlentities($_GET['model'])?>
  In a city of <?php echo htmlentities($_GET['city'])?>

# How to insert subid and other info to a landing page with Preload loading type

If you enable “Preload” loading type for a landing page, you can use all macros just in a landing page code, e.g. {subid} macros:

<script type="text/javascript">
var m1_product_id = 123;
var ref = 123;
var script = document.createElement("script");
script.src = "http://m1-shop.ru/send_order/?ref="+ref+"&s={subid}&w="+getC("w")+"&t="+getC("t")+"&p="+getC("p")+"&m="+getC("m")+"&product_id="+m1_product_id+'&out=1';

If you use «Landings and Offers» scheme in a stream, the link to an offer is created by a macros {offer}:

<a href="{offer}">CLICK</a>

# Why are such metrics as LP clicks, LP CTR and Sale Time not calculated?

A click on an offer should be done through Keitaro in order to calculate all these metrics. As you need to add offers to Keitaro and set up landing pages and offers in a single stream, there should be installed a code for sending to an offer.

# How to transfer parameters to a FB pixel

An example of transferring subid when the “Preload” feature is enabled on a landing page:

// Insert Your Facebook Pixel ID below.
fbq('init', 'FB_PIXEL_ID');
fbq('track', 'view', {
   subid: '{subid}'

# How to protect a landing page from direct visits

  1. Transfer parameter in a landing page URL, e.g., code=123


  1. Add a code to a landing in the very beginning of a page:

<?php if (!isset($_GET['code']) && $_GET['code'] != '123') { die(); } ?>

# Why are images not shown if I use «Show HTML»?

Keitaro shows a page not on the address you created your website. That's why a web browser can't find images. Change all images URLs to absolute: http://site.com/folder/image.png.

# How to get rid of direct landing page visits

Solution on PHP:

if (!isset($_GET['_subid'])) {
    header('Location: http://example.com/campaign');

# Is it necessary to put full paths to files in local landing pages?

You can put relative paths, e.g.:

<img src="images/photo.png" />

# Is it necessary to put any integration code to the local landing page?

No, it isn't. A local landing page works in campaigns.

# Why are the clicks are doubled when the landing page is opened?

Usually, it happens when “Catch 404 errors” feature is enabled in domain settings. You can either disable this feature or look for the files which are called by your landing page but are missed in an archive.

This can be checked with the browser JavaScript console.

# Why don't anchors work in local landing pages?

The used basepath can't work with anchors. The solution is to use class and id instead of anchors.

# Why is base href necessary in local landing pages?


element is defined inside the container and shows the browser about the complete base address of the current document. The tag is for the documents that use a relative address, so with the base href these documents can be transferred to another folder or even to another server without losing the connection.

The browser looks for the

tag, determines the full address of the document, and loads it correctly. For example, if the document address is specified as <base href ="http://tracker_domain/lander/folder/">, then when adds images, it is enough to use the relative address <img src ="images/image.jpg">, which allows the browser to find a graphic file no matter where the current web page is.

Remove 'base href' tags if there are any before uploading the landing page to Keitaro. Using your own base href will break your landing page, even if your code is commented out.

# Is it necessary to put the full path to the file?

You can indicate the relative path, e.g.: <img src="images/image.jpg" />

# Can I get rid of base path in local landing pages?

No, you can't, this is one of the basics of tracker's work. Use “Show HTML” action and manually insert addresses of all styles and images if you need to eliminate external addresses.

# Can I use external svg in a local landing page code?

No, external svg won't work.

You need to copy and paste the content of an external svg file instead of <use ...></use>.

# How to show time on a landing page

PHP Solution:

echo (new DateTime(null, new DateTimeZone("Europe/Moscow")))->format("Y-m-d H:i");


echo date('Y-m-d H:i');

# Why local landing showing 'Timed out'

This message is shown when landing page exceeded maximum execution time. Current maximum execution time is set in "Execution timeout for local landing pages and local offers" param. It can be found in 'Maintenance -> Settings -> Main' menu. Maximum value is limited to 9 seconds.

Last Updated: 7/22/2021, 6:46:16 AM