Redirects and Actions

List of actions

  • Open in frame — generates tag frameset and load page in it
  • Open by CURL — downloads page by CURL library and shows to browser
  • 404 Not Found — shows blank page with HTTP status “404 Not Found”
  • Send to Campaign — sends to another campaign
  • Show text — shows text
  • Show as HTML-page — generates HTML c
  • Show SubId — shows subid. This action for “Visits and conversion tracking”

List of redirects

  • HTTP redirect — sends status “302 Moved Temporarily” (the most common redirect)
  • JS redirect — executes JS code with redirect
  • Meta redirect — redirects by meta tag
  • Double meta redirect — redirect that uses two steps
  • Redirect with blank referrer — executes JS code that clear referrer
  • REMOTE — request page and execute redirect to URL that the page contains
  • FormSubmit — shows HTML form with POST method and automatically submit it.
  • Redirect for iframe — use this redirect in case Keitaro is integrated through <iframe>
  • Redirect for Script — use this redirect in case Keitaro is integrated through <script>

Redirect and action compatibility

Action Link Script
HTTP redirect Redirect Executes JS code Redirect in frame
JS redirect Redirect Doesn't work Redirect in frame
Meta redirect Redirect Redirect Redirect in frame
Double meta redirect Redirect Redirect Redirect in frame
Redirect with blank referrer Redirect Doesn't work Redirect in frame
Open in frame Shows frame Doesn't work Frame in frame
CURL Shows page Executes JS code Page in frame
404 NotFound Page 404 Nothing Empty frame
Show text Shows text Executes JS code Text in frame
Show HTML Shows page Doesn't work Page in frame
REMOTE Redirect Executes JS code Redirect in frame
FormSubmit Redirect Doesn't work Redirect in frame
Redirect for iframe Doesn't work Doesn't work Redirect
Redirect for script Doesn't work Redirect Doesn't work
SubId Shows subid Doesn't work SubId in frame

How to create custom action or redirect?

How a REMOTE action works

This action works in several steps:

  1. It downloads a page, which you pointed to in URL field.
  2. It takes the content, which is used as an URL for further redirect.
  3. It makes an HHTP-redirect to a new URL.

An example of a page content for REMOTE:

http://site2.com/page123.html
<?php
if (!file_exists('./links.txt')) {
    die('No file links.txt');
}
$content = file_get_contents('./links.txt');
$lines = explode("\n", $content);
$links = array_map(function($line){
  $line = trim($line);
  return empty($line) ? null : $line;
}, $lines);
$links = array_filter($links);
echo $links[rand(0, count($links) - 1)];
?>

At the script directory create a file links.txt with a list of links one per line.