Documentation sections

Stream templates, export and import

How to save stream settings to your personal library and move a stream to another campaign or another tracker with a JSON file.

Stream settings can be saved as a template or downloaded as a JSON file, and then used to create a stream in any campaign. A template is kept in your personal library; a file is for passing settings to a colleague and moving them to another installation. The Templates («Шаблоны») and ⋯ buttons are present where you can change the campaign: a campaign with the “view only” («только просмотр») label does not have them.

Save a stream as a template

  1. Open the campaign on the Streams («Потоки») tab.
  2. Click ⋯ in the stream card — the button between Copy («Копия») and the gear. The Stream template («Шаблон потока») window opens.
  3. Check the Template name («Название шаблона») field. By default, it contains the stream name. The length is 1 to 120 characters.
  4. Click Save template («Сохранить шаблон»).

The message “Template saved. It is available in ‘Templates’ in any of your campaigns.” («Шаблон сохранён. Он доступен в «Шаблоны» любой вашей кампании.») appears.

A template keeps the settings as of the moment you save it: later edits of the stream do not get into it. Before saving, the stream goes through the same check as on import; an error message appears in the same window, and the messages are explained in the File limits section.

Download a stream to a file

  1. Click ⋯ in the stream card.
  2. Click Download JSON («Скачать JSON»).

The browser downloads the stream-<stream ID>.json file.

Create a stream from a template or file

  1. Open the campaign you need on the Streams tab.
  2. Click Templates above the stream list. The Stream templates («Шаблоны потоков») window opens.
  3. Choose where the settings come from:
    • find a template via the Find template («Найти шаблон») field and click Select («Выбрать»);
    • or click Upload JSON («Загрузить JSON») and choose a .json file of up to 256 KiB.
  4. Wait for the check to finish; meanwhile, the window says “Checking…” («Проверка…»). Then the Stream settings («Настройки потока») window opens with the fields filled in.
  5. Go through the General («Основное»), Filters («Фильтры»), Rotation («Ротация») and Schedule («Расписание») tabs and fix what should be different in this campaign.
  6. For the stream to accept traffic right away, turn on Stream active («Поток активен») on the Schedule tab. In the draft, this checkbox is off.
  7. Click Save stream («Сохранить поток»).

Until you click Save stream, the stream is not created: if you close the window, nothing changes in the campaign. If the window did not close after the click, the stream was not saved: the error text is shown at the top of the campaign page, under the window. Close the window, read the error and repeat the import.

Checking the result

  • The new stream is the last one in the campaign's list.
  • If you did not turn on Stream active, the stream name has the “paused” («пауза») label. You can enable the stream with the switch on the left of its card.

What is carried over

The template and the file include:

  • the name, stream type, action and weight;
  • the action parameters: Redirect method («Способ редиректа»), When to choose the offer («Когда выбрать оффер»), destination URL, HTML, text and Target campaign alias («Alias целевой кампании»);
  • the conditions of the Filters tab and the AND / OR links between them;
  • the schedule and click caps with their time zones;
  • the stream's offers and landing pages: their identifiers and shares;
  • the selection mode, the memory period and the order of items.

Not included:

  • the state — a draft is always paused;
  • the place in the list;
  • the Hide click counter («Скрывать счётчик кликов») checkbox — it is off in the draft;
  • clicks counted against the caps — the new stream counts from zero;
  • the offers and landing pages themselves and their page files.

Offers and landing pages on import

Offers and landing pages are recorded in the template and in the file by their full identifier (UUID), not by the #… number from the ID column. During the check, each of them must exist in this tracker and be available to you, otherwise the draft does not open. The check is repeated when you click Save stream.

  • Offers and landing pages created in another installation have different UUIDs, and a file containing them will not pass the check there.
  • Streams with the Direct URL («Прямой URL»), HTML, Show text («Показать текст»), Send to campaign («Передать в кампанию»), 404 stub («Заглушка 404») and Nothing (empty response) («Ничего (пустой ответ)») actions have no offers or landing pages, and this check does not concern them.
  • With the Send to campaign action, the alias is carried over as is. Check the Target campaign alias field in the draft.

Template library

  • Templates are personal: you see only your own, and other team members do not see them. To pass settings to a colleague, download the JSON and send the file. The offers and landing pages from the file must be available to them too.
  • New templates are listed first. A template has two lines: its name and the name of the stream it was saved from.
  • The Find template field searches by template name.

To delete a template, click × in its row and confirm the prompt “Delete template ‘…’? Existing streams will remain.” («Удалить шаблон «…»? Существующие потоки останутся.»)

File limits

The file is a JSON object with three fields: format with the value tracker-stream, version with the value 1, and stream with the stream settings. The stream fields are described on the Admin API: streams page; any file downloaded with the Download JSON button can serve as a sample. The id, campaign_id, position and state fields are ignored on import.

The offers and landers lists may be empty. Then you choose offers and landing pages in the draft on the Rotation tab.

A template and a file are checked by the same rules. If a rule is broken, one of these messages appears in the window:

MessageRule
“File larger than 256 KiB” («Файл больше 256 КиБ»), “Template larger than 256 KiB” («Шаблон больше 256 КиБ»)The file and the stream settings are up to 256 KiB
“A tracker-stream template of version 1 is required” («Нужен шаблон tracker-stream версии 1»)format is tracker-stream, version is 1
“Stream name: 1 to 160 characters” («Название потока: от 1 до 160 символов»)The name is not empty and not longer than 160 characters
“Unknown stream type” («Неизвестный тип потока»), “Unknown stream action” («Неизвестное действие потока»)type and action_type contain values from the stream object
“Stream settings size exceeded” («Превышен размер настроек потока»)Weight from 0 to 1,000,000,000, up to 64 conditions, up to 200 offers and up to 200 landing pages
“unknown filter type or operator: …” («неизвестный тип или оператор фильтра: …»)The condition field and operator come from the stream filters
“Invalid or duplicate stream target” («Некорректная или повторяющаяся цель потока»)Each offer and landing page has an id, there are no duplicates, the share is from 0 to 1,000,000,000
“Click caps: integers from 0 to 1,000,000,000,000” («Лимиты кликов: целые числа от 0 до 1 000 000 000 000»)The caps per hour, per day and in total
“Unknown schedule time zone” («Неизвестный часовой пояс расписания»), “Unknown cap time zone” («Неизвестный часовой пояс лимита»)The zone name is from the IANA database, for example Europe/Warsaw
“Schedule days: 1 to 7” («Дни расписания: от 1 до 7»)Days are numbers from 1 (Monday) to 7 (Sunday)
“Invalid schedule time” («Некорректное время расписания»)The start and end times are in the HH:MM format

Troubleshooting

“Could not read the JSON file” («Не удалось прочитать JSON-файл») and “Could not read the template file” («Не удалось прочитать файл шаблона»)

The file is damaged or was edited by hand with an error. The first message means the file cannot be parsed as JSON. The second means the file is not a JSON object or a field value has the wrong type, for example a number in quotes. Download the stream again with the Download JSON button.

“offer unavailable: …” («оффер недоступен: …») and “landing page unavailable: …” («лендинг недоступен: …»)

After the colon there is the UUID of the offer or landing page from the file. Such a page does not exist in this tracker, is in the trash or is not available to you. To compare UUIDs, hover over the #… number in the ID column of the Offers («Офферы») or Landing pages («Лендинги») section: the UUID is shown in the tooltip, and clicking the number copies it.

  • Restore a deleted page from the trash.
  • For someone else's landing page, ask to be granted access.
  • For someone else's offer, ask to be granted access with the Access («Доступ») button. A copy made with the Copy («Копировать») button will not work: it has a new identifier. Alternatively, clear the offers list in the file and choose your own offer in the draft on the Rotation tab.
Updated Need help? ↗