Working with Doorways

How to connect Keitaro to doorways?

There are several ways:

  1. By a simple link <a>;
  2. By the Script tag. Probably redirects will be executed after the page has loaded;
  3. By the Iframe tag. It works similar to the method Script;
  4. The server request to Keitaro API. It is perfect for cloaking and for hiding the presence of Keitaro.

You can take the ready code for each of these methods at the page “Campaign > Additional > Integration Assistant”.

You can also read about which actions to choose at streams: how_actions_work_in_various_cases.

How can the doorway traffic be divided by keywords?

  1. Create a campaign;
  2. Create several streams. Add “Keyword” filter to the streams. Set the first stream to *car*, the second one to *credits*, the third one to *books* (the settings are examples only);

How can the traffic be divided by country?

- Create a campaign;

  1. Create several streams. Add the “Country” filter to the streams and set the first stream to *Russia*, the second one to *USA*, the third one to *Germany* (the settings are examples only);

How can the traffic be divided by cities?

  1. Create a campaign;
  2. Create several streams. Add the “Cities” filter to the streams and for example set the first stream to *London*, the second one to *Manchester*, the third one to *Oxford* (the settings are examples only);

Dividing the traffic into mobile and desktop

  1. Create a campaign with “Consecutive” stream selection mode;
  2. Create two streams. The first one is for mobile traffic, add the “Device, select, Phone” filters to it;
  3. Leave the second stream without filters. Desktop traffic will be redirected there.

How can I set up a redirect to a doorway?

Go to Integration section at the campaign page. Choose the most suitable option from Redirect category. Copy the code and place it to the doorway template.

How can I set up a button to a doorway?

Go to Integration Assistant section at the campaign page. Choose the most suitable option from Links category. Copy the code and place it to the doorway template.

How to redirect certain users from the website? (JS solution)

Connect TDS by the script.

  • Create a campaign.
  • At the campaign settings choose the Default Action and Action for Bots “Show text”. Leave the text field empty. So, bots and unwanted users will see the website without redirecting;
  • Create a stream with filters and action “Redirect for Script”;
  • Open the page “Integration Assistant”, choose “Other > Script”;
  • Insert the code on your website
  • (not necessary) At the campaign settings tick “Do not collect statistics on Default Action”. So, statistics will be collected only from redirects.

How to redirect certain users from the doorway? (Server solution)

  1. Go to “Integration Assistant” section at the campaign page.
  2. Choose “API” in the category “Other” and copy the code;
  3. Paste the code in the doorway template before the tag <head>.

The code is presented in PHP, but you can write it in any other language according to the documentation.

To leave the bots on the doorway, select the action for bots “Show Text” at the campaign settings.

How can the fullscreen frame be shown at the doorway page?

  1. Go to Integration Assistant section at the campaign page.
  2. Choose “Other > Frame (frameset)”. Copy the code and place it to the doorway template.
  3. At the streams use any of redirects: HTTP, JS, formSubmit.

How can the fullscreen frame be shown to only certain users?

1. Go to Integration Assistant section at the campaign page.

2. Choose “Other > Keitaro API” (code is also available on the page php_example).

3. Copy the code and place it at the beginning of the website script. For example:

<?php
...code api...
?>
<html>
code of website
</html>

4. Find in the API code the line:

echo $result->redirect->content;

Add after it:

exit();

5. At the streams use the action “Open in Frame”.

How to use redirects from TDS without disclosing address of TDS?

There is an example according to the scheme “A source of traffic > Doorway > go.php > Recipient of traffic”.

  1. Go to Integration Assistant section at the campaign page.
  2. Choose API in Other category. Copy the code.
  3. Create a new script, for example, go.php, in doorway directory. Insert the code there.
  4. Now you can redirect the users directly to this script.

The code is created in PHP, but you can type your script that makes requests to Keitaro API, check the API documentation.

How to work with multiple domains?

There are two ways:

How to use a campaign by a subdomain name?

Consider the case when you need to use subdomains as the campaign URL-address. For example, instead “http://tds.com/campaign1”, “http://tds.com/campaign2” use “http://campaign1.tds.com”, “http://campaign2.tds.com”.

1. Create a new website at the Control Panel, for example, “x.tds.com”. Add all subdomains as mirrors (Aliases) to it;

2. Use the script for working with Keitaro API: Campaign > Integration Assistant > Other > Keitaro API;

3. Replace the string with the name of the campaign:

$campaignId = 'campaign';

to

$campaignId = substr($_SERVER["HTTP_HOST"], 0, strpos($a, $_SERVER["HTTP_HOST"]));;