How to add a prelanding page

All pre-landing pages that you use in your network should be located on one dedicated website. The name of the pre-landing folder must be unique throughout the system.

Prelanding requirements

To work correctly with AlterCPA, prelandings must meet the following requirements:

  • The main contents of the prelanding should be placed on one page. Any transition from prelanding is performed on the corresponding landing page.
  • The prelanding page should not contain any scripts blocking the operation. Very often, this phenomenon is observed on sites made on site builders. Before using a site that was designed via site builder, it must be rebuilt from scratch. It is not recommended to use prelanding pages from site builders in real work, since their behavior can be unpredictable.

Adding prelanding to site repository

Before adding a prelanding page in the system, you need to place it on your server. To place landing and prelandings pages, an appropriately configured repository is used. If you used the script from the platform’s delivery kit to configure the server, this repository is located on your server in the default.site or r.domain.com folder.

Inside this repository, you need to create a folder in which the site will be located. We recommend using the location of the prelandings according to one of the following schemes:

r.domain.com/offer/geo/site
r.domain.com/offer/lang/site
r.domain.com/offer/site

In these schemes r.domain.com is the name of your existing repository folder, offer is short offer name, geo and lang are two-letter country and language codes, and site is the site name. For maximum compatibility, it is recommended to write folder names in lower case without using capital letters. We recommend choosing a site name for prelanding pages from the list: news, blog, info, whatsnew, important, blog-2019 etc. For example: r.altercpa.site/titan-gel/en/blog.

The first and second schemes are suitable for networks working with the same offers in several countries or in several languages. The third scheme is optimal for networks working in one language or in one country.

After creating the folder, place your landing page files in it. The main landing page should be renamed to index.php. As the next step, add the landing page to the offer in the platform in the "Control - Offers" section by the "Sites" button. As the address, you must specify the full path to the folder starting with the domain, for example: r.altercpa.site/titan-gel/us/buy - without http:// in front and / at the end.

Prelanding page setup

The prelanding must consist of one working index.php file, and the other content consists only of design elements (fonts, styles, scripts, images). If prelanding was provided to you by the coder, simply rename the suggested index.php and make the following changes with it.

At the beginning of the index.php code needs to be inserted in the code (XXX – number of the offer). This code is displayed in the form of a site editor in the system, copy it from there. It looks like this:

<?php
$cms = require_once $_SERVER['DOCUMENT_ROOT'] . '/init.php';
$url = $cms->preland( 1, 2 ); // Offer and site IDs
?>

The href field of each link must contain the code:

<?=$url;?>

All the links should look like this:

<a href="<?=$url;?>"> ... </a>

Put the following code in the header part before the </head> tag:

<?php $cms->header(); ?>

Put the following code before the </body> tag:

<?php $cms->footer(); ?>

In the site code, you can use the insertion of price and geo parameters, which are determined automatically depending on the list of countries specified in the offer settings and the country of the customer.

  • <?=$cms->price;?> - the price of the main item in customer's country
  • <?=$cms->prices[123];?> - the price of variant item with ID 123
  • <?=$cms->oldpr;?> - the "old" price of the main item in customer's country
  • <?=$cms->oldprs[123];?> - the "old" price of variant item with ID 123
  • <?=$cms->discount;?> - the discount of the main item in customer's country
  • <?=$cms->discounts[123];?> - the discount of variant item with ID 123
  • <?=$cms->currency;?> - the currency of customer country
  • <?=$cms->country;?> - customer country ISO-code
  • <?=$cms->geoinfo('city'); ?> - customer city (if available)
  • <?=$cms->geoinfo('region'); ?> - customer regoin (if available)
  • <?=$cms->geoinfo('district'); ?> - customer district (if available)

Adding form on the prelanding page

You can add forms to send leads. For their functioning, a landing is required. Please note that in statistics, the lead will not be attached to the pre-landing, but to the landing. The pre-landing form essentially sends the lead to the landing page without opening the landing page itself.

  1. In action attribute of the form put <?=$url;?>
  2. In method attribute of the form put post
  3. In the beginning of the form add <?=$cms->params(); ?> for the new CMS or <?php params( $url ); ?> for the old one.
  4. Rename the fields according to the landing page requirements.

The form should look like this:

<form action="<?=$url;?>" method="post">
  <?=$cms->params(); ?>
  <input type="text" name="name" />
  <input type="tel" name="phone" />
</form>

Copying and uploading prelanding pages by URL

You can download pre-landing pages of your suppliers in automatic mode. To do this, use the "Download" section in the offer management. In this section, add a upload task, specify the required offer and a list of URL sites that you want to upload. You can specify the name of the folder where the site will be uploaded, a space after the URL of the site. Prelanding pages are uploaded in semi-automatic mode, they must be modified and corrected after uploading. Proofreading should include the removal of third-party JS-code that may interfere with the operation of the site. You can set regular tasks to clear the site code when you add a upload job tasks.

NB! Once again. After downloading someone else's website illegally, you need to take measures to restore your karma. Pet the cat!