Documentation

Traffic

Connecting your site

For a flow to start working, link it to your site. One method is enough. Your site's address is what goes into the ads, and the pages stay with you.

On this page

Which method to choose

  • Site on Tilda, Webflow, Unbounce, Shopify or WordPress → site builder.
  • Traffic already runs through your own Keitaro or Binom → Keitaro filter or Binom gateway.
  • You need “Tracker” mode → only the PHP file.
  • You can't edit the site code, but the domain is on Cloudflare → Cloudflare.
  • In all other cases → JS tag, the first method in the connection window.
MethodWhat you need“Tracker” modeOur code in the page sourceDifficulty
JS tagaccess to <head>novisibleeasy
PHP filePHP hostingyesnot visible: the decision is made on the servermedium
Keitaro / Binomyour own trackernonot visible: the decision is made on the servermedium
Site builders, Cloudflarean account with the servicenovisible (it's the same tag)easy

If the flow's site is hosted with us (Where to host the site → On our server), there's nothing to connect: we put the flow file on the server and keep it updated ourselves. Details are in the Sites section.

Open the connection window

  1. Find the flow

    Go to Flows → in the flow's row click ⋯ → Connect.

    A flow row in the list: the ⋯ button and the open menu with Connect, Duplicate and Delete
    Flow row: 1 is the flow actions menu, 2 opens the connection window.
  2. Expand one method

    The methods are collapsed, and you can open only one at a time. A working method is marked green with an “Installed” badge.

    Connect window: list of methods: Add the script to your landing page, Upload the file to your server (marked Installed), Keitaro filter, Binom gate, WordPress, Cloudflare, Tilda
    The flow's connection window: 1 “Add the script to your landing page” (JS tag), 2 “Upload the file to your server” (PHP file), already installed on the site here.

A flow in “Tracker” mode connects only with the PHP file: the tag, Keitaro, Binom and site builders aren't shown for it.

JS tag

  1. Copy the code

    Expand Add the script to your landing page and click the copy button to the right of the code 1.

    Add the script to your landing page block: the code field with a copy button, a diagram of pasting into head, a warning about tag managers
    In the demo account the code is hidden; in your dashboard, field 1 will hold your flow's code. Line 2 shows where to paste it: right after <head>.
  2. Paste it as the first line in <head>

    On every page of the landing, right after <head>, above all other scripts 2. Save and reload the page.

    index.html
    <head>
      <!-- code from the connection window -->
      <meta charset="utf-8">
      …
    </head>

    Don't load the code through Google Tag Manager or other tag managers, and don't add async or defer: with them the script runs later, and the page gets shown to everyone before there's a decision.

  3. Check the connection

    Click Check my page: the dashboard will open the main page of the folder that holds the flow's offer and look for the code there. Without an offer address, the check won't start.

    Check the connection step with the Check my page button
    The check button is the last step for the JS tag and the PHP file.
    Check the connection step after a check: the Check my page button and the line Found on your page
     1 the check button, 2 the result: the code was found on the page. The block gets the “Installed” mark.

The tag hides the page until the decision arrives. If no decision comes within 5 seconds, the tag sends the visitor to the White Page. And if the White Page has no address of its own (“Status code” mode or our ready-made page), the visitor sees an empty page.

PHP file

For sites on hosting with PHP. The only method that works with “Tracker” mode. Shadow mode works with the PHP file, the Keitaro filter and the Binom gateway.

  1. Download the file

    Expand Upload the file to your server and click Download file 1.

    Upload the file to your server block: Download file button, folder diagram with index.php and offer.php, a step with the new landing address
    The PHP file block: 1 download button and the landing folder diagram 2.
  2. Put it in the landing root as index.php

    And rename your own landing, for example to offer.php:

    Landing folder
    /
    ├── index.php   ← our file
    └── offer.php   ← your landing (was index.php or index.html)
  3. Set the new landing address as the flow's offer

    For example, https://your-site.com/offer.php.

  4. Put a .htaccess file next to it

    These lines are the same for all flows; if the folder already has a .htaccess, add them below the existing RewriteEngine On.

    .htaccess
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.php [L,QSA]
  5. Check the connection

    The Check my page button: the dashboard checks that the file responds.

Why the .htaccess rule

The rule routes to our file every request for an address the site doesn't have. This is needed for two things.

Pre-landing. After the pre-landing button, the offer opens at the start address in the same folder as the ad link: your-site.com/start?tags for the offer your-site.com/offer.php, your-site.com/folder/start?tags for your-site.com/folder/offer.php. Without the rule, reloading this page gives a 404. With the rule, the {click_url} button leads to your domain, your-site.com/start?tags, not to our click-through address: the file reports the click to us on its own, and our domain is nowhere in the pre-landing's code.

A White Page on another domain. The file serves its pages, images and styles at your domain's addresses: the menu link white-site.com/kontakt.html becomes your-site.com/kontakt.html, and the visitor doesn't leave for the White Page's domain. Without the rule, the links keep pointing to the White Page's domain.

On nginx without Apache, add the rule below (replace /folder/ with your folder) and still put a .htaccess file with the same lines next to index.php: nginx doesn't read it, but our file uses it to know the rule is set up. With try_files alone, the page reloads fine, but the pre-landing button and the White Page links lead to our addresses.

nginx
location /folder/ {
    try_files $uri $uri/ /folder/index.php?$query_string;
}

The file on the server doesn't update itself. When a new version is out, the window shows a “You're running an older file” banner and a list of what your version can't do. Download the file again and replace it.

How to upload the file to your hosting

Put the PHP file and .htaccess into the site folder your ad points to. If the ad leads to my-landing.com/promo/, that's the public_html/promo/ folder; if it leads to the root, my-landing.com/, it's public_html/ itself.

If the folder already has an index.php or index.html, that's your landing. First rename it, for example to offer.php, and set the new address in the flow's offer; only then upload our index.php. Otherwise it will replace the landing. If there's both an index.html and an index.php, many hosts open index.html first, and then our file won't run.

Via the hosting panel's file manager

  1. Open the file manager

    In the hosting panel, the “Files” or “File Manager” section 1.

  2. Go to the landing folder

    Usually public_html (sometimes www or htdocs), then the folder the ad leads to 2.

  3. Click “Upload”

    Button 3 opens the upload window.

    Example hosting panel: file manager, the /public_html/promo/ path and the Upload button
    Example interface: your host's buttons may be named differently. 1 file manager, 2 landing folder, 3 upload.
  4. Choose the files

    Drag index.php and .htaccess into the window 4 and wait for the “uploaded” mark 5. The name must be exactly index.php: when you download it again, the browser sometimes adds “(1)” to the name.

    Example upload window: a drop zone and two uploaded files, index.php and .htaccess
    Example interface. 4 drop zone, 5 uploaded files.
  5. Check permissions and open the site

    File permissions 644, folders 755. Some managers hide the .htaccess file: turn on “show hidden files”. Open the landing address in a browser and click Check my page in the dashboard.

Via an FTP or SFTP client

  1. Connect

    Host, username and password are in the hosting panel, FTP/SSH section 1. Port: 21 for FTP, 22 for SFTP. Click “Connect” 2.

  2. Open the landing folder on the server

    On the right is the server: go to public_html/folder 3.

  3. Transfer the files

    On the left is your computer: select index.php and .htaccess 4 and drag them to the right 5.

    Example FTP client: connection fields, computer files on the left, the /public_html/promo/ folder on the server on the right
    Example interface: your client's buttons may be named differently. 1 connection details, 2 connect, 3 folder on the server, 4 files on your computer, 5 transfer.
ProblemHow you'll noticeWhat to do
File in the wrong folderThe check says “The page opened, but this method didn't respond on it”Put the file in the folder that opens at the address from the ad
Old PHPThe page says “PHP 7.2 or higher is required.”Turn on PHP 7.2 or newer in the hosting panel
.htaccess missing or hiddenAfter the pre-landing button, the start page gives a 404Upload .htaccess next to index.php
Hosting proxyAll visits in the log have the same IPRoute the domain through Cloudflare (orange cloud) or ask your host to pass the visitor's real IP (see If something doesn't work)
Hosting or CDN cacheEveryone sees the page, or the decision changes with a delayExclude the landing from caching

Keitaro filter

Keitaro filter block in the connection window: three steps and the Download the filter button
 1 download the filter, 2 where to put the file on the Keitaro server, 3 how to add the filter to a Keitaro stream.

If traffic already runs through your Keitaro, ArtisanClo becomes a filter in the Keitaro stream: Keitaro asks us whether to let the visitor through to the offer, and your Keitaro streams decide where exactly to send them.

  1. Download this flow's filter file

  2. Put it on the Keitaro server

    In the /var/www/keitaro/var/filters folder (application/filters in older versions), then reload the Keitaro page.

  3. Add the filter to the campaign

    In the Keitaro campaign, open the stream with the offer and add a filter with the same name as the file, in “Yes” mode. Below it, place the stream with your White Page: everyone who fails the filter goes there.

Keitaro calls the filter before it answers the visitor, so there's no waiting page here: the JavaScript check, time on page and live interaction don't apply with this method, and the decision is made only from the network and the request data. The offer and White Page addresses in the ArtisanClo flow aren't used; Keitaro streams set them. If our service doesn't respond within 3 seconds, the visit goes to the White Page. You can turn on the JavaScript, time and interaction checks separately; see Browser check on the pre-landing.

Binom gateway

Binom gateway block in the connection window: three steps, the file include line and the Download the gate button
 1 download the gateway file, 2 the line for the first line of the landing, 3 check: a person on the landing, a bot on the White Page.

If traffic runs through your Binom, ArtisanClo connects to the landing as a gateway: our check is the landing's first line and decides who gets to see it before it opens. A person sees your landing with the usual Binom link to the offer; a bot or reviewer sees the White Page.

  1. Download this flow's gateway file

    And put it next to the Binom landing file on your server.

  2. Include the file as the landing's first line

    Before any output:

    Binom landing
    <?php require __DIR__ . '/ac_binom_NNN.php'; ?>
  3. Check the connection

    A person gets through to the landing, a bot gets the White Page.

The gateway decides before the landing answers the visitor, so it has no waiting page: the JavaScript check, time on page and live interaction don't apply, and the decision is made only from the network and the request data. If our service doesn't respond within 3 seconds, the visitor sees the White Page whose address was written into the file when you downloaded it. Changed the White Page? Download the file again. If the White Page has no address of its own (“Status code” mode or our ready-made page), the gateway answers with a 503 error in that situation. Binom has no filters folder like Keitaro, so we connect with a file in the landing itself. You can turn on the JavaScript, time and interaction checks separately; see Browser check on the pre-landing.

Browser check on the pre-landing

A tracker filter only sees the IP address and request headers; it doesn't check the browser itself. To check that too, put our tag on the pre-landing where the tracker sends those who passed the filter. The tag will see whether JavaScript runs, how long the visitor stayed on the page, whether they moved the mouse or scrolled, and whether it's an automated browser. Failed the check: they see the White Page. Passed: they stay on the pre-landing and continue through your campaign. In statistics the visit is counted once, not twice.

It's turned on in the flow's connection window, in the Keitaro filter or Binom gateway block. That's also where you'll find the exact parameter for the pre-landing address (shown below as NAME) and three lines that show everything is connected correctly.

Browser check on the pre-landing block in the Keitaro filter: the parameter for the pre-landing address, the tag and three green check lines
 1 the parameter for the pre-landing address, 2 the tag for its <head>, 3 three check lines: everything is connected.

Keitaro

  1. Add the parameter to the pre-landing address

    In Keitaro, in the stream with the offer, add this parameter to the pre-landing (or landing) address: after ? if the address has no parameters yet, or after & if it does. It lets us recognize on the pre-landing the visitor the filter let through:

    Parameter
    NAME={subid}
  2. Paste our tag at the very top of this pre-landing's <head>

  3. Update the filter file

    Download it again and replace the old one: the new version passes us the subid. Then open the campaign link yourself: after the first visit, the three check lines turn green.

Binom

  1. Add the parameter to the landing address

    In Binom, add this parameter to the landing address, after ? or &. It lets us recognize on the landing the visitor the gateway let through:

    Parameter
    NAME={clickid}
  2. Paste our tag at the very top of the same landing's <head>

  3. Update the gateway file

    Download it again and replace the old one: the new version reads the clickid. Then open the campaign link yourself: after the first visit, the three check lines turn green.

Without the parameter we still match the visit by IP address and browser, but less precisely: on mobile carriers, many people often share one address. A visit the tracker let through appears in the log as soon as the tag responds. If the visitor never reached the pre-landing, the visit is recorded about two minutes later with the decision the tracker filter made. Anyone who opens the pre-landing directly, bypassing the tracker (an ad network moderator, for example), goes through the tag's full check. This check doesn't work in shadow mode or in “Tracker” mode.

Site builders

WordPress block in the connection window: plugin installation steps and the Download the plugin button
 1 download the plugin, 2 install it in WordPress, 3 paste the API token, 4 pick the flow.

On Starter you get the JS tag, the PHP file, the Keitaro filter and the Binom gateway. The WordPress plugin, the Cloudflare worker and step-by-step instructions for site builders come with Professional and up, and with the trial. A site on Tilda, Webflow, Unbounce or Shopify can be connected on Starter too, with the regular JS tag, just without the instructions.

  • WordPress from Professional: Download the plugin → in WordPress, “Plugins” → “Add New” → “Upload Plugin” → “Install Now” → “Activate” → “Settings” → Traffic Gate (that's our plugin's name) → paste the API token from “API integration” (in the menu under your avatar) and pick the flow. If the site has a caching plugin, clear the cache after connecting.
  • Tilda, Webflow from Professional: you need a paid plan of the site builder itself. Paste the code into the head section and publish the site.
  • Unbounce from Professional: Script Manager, placement: Head. Doesn't work on an unbouncepages.com subdomain: you need your own domain.
  • Shopify from Professional: paste the code into the theme template right after <head>.

Each site builder has its own block in the connection window:  1 the code to paste, copied with the button on the right, 2 the steps for that builder.

Tilda block: code to paste and three steps
Tilda. 1 “Code to paste”, 2 setup steps.
Webflow block: code to paste and three steps
Webflow. 1 “Code to paste”, 2 setup steps.
Unbounce block: code to paste and four steps
Unbounce. 1 “Code to paste”, 2 setup steps.
Shopify block: code to paste and four steps
Shopify. 1 “Code to paste”, 2 setup steps.

Cloudflare from Professional: a worker on the Cloudflare side inserts the tag, and the site files don't change. Step by step in Connecting via Cloudflare.

Connection check

  • Check results: “Setup found on your page”, “Your page opened, but this setup did not answer on it” or a message that the page couldn't be opened, with the reason:
    • the page didn't let our check in: most often it's bot protection at the host or CDN (a Cloudflare challenge, for example). The connection may still be set up correctly: the first real visit will confirm it;
    • there's no page at the offer address;
    • the server hosting your page answered with an error;
    • the page didn't answer in time;
    • the page redirects away.
    The response code is shown in brackets; you can pass it on to support.
  • If the page has the tag of another of your flows, the check says so: “The page has the tag of another of your flows — “…”. Replace it with this flow's snippet” (the snippet is the tag code).
  • You can check once every 20 seconds; click sooner and the dashboard answers “Checked a moment ago”. Each check clears the “Installed” and “Connected” marks for every method, Keitaro and Binom included. “Installed” comes back right away if the check found the connection, otherwise with the first visit. “Connected” always comes back with the first visit.
  • Under the method you'll see “Works now” or the date it last worked.
The code must load first

If the tag script doesn't load (for example, a network or server-side protection blocks it), the page won't be hidden and moderation will see it. Put the code as the first line and check the connection after every change to the site.

ArtisanClo · Dashboard documentation. Questions — info@artisanclo.com or @artisanclo_support on Telegram.