Campaign optimizer - Advanced configuration

Published May 04, 2020
Modules
Difficulty

Campaign optimization is a very important feature that we develop to let you choose the best time and channel for your customers and send them messages with the highest chances for conversion.

Important: Basic information about our campaign optimizer can be found HERE

Prerequisites


General

AI time optimizer configuration

  • Page visits & other campaign visits.

Create predefined analytics


At the very beginning, in order to achieve channel optimization, we have to use predefined analytics. Let’s say we want to use basic, predefined, CTR based channel optimization:

Important: We are using this example to go through the process of configuring an optimized campaign. Please be aware that the base on which you calculate the optimization and metrics are fully customizable.
  1. Create the predefined analytics.

    • First of all segments

    Choose the predefined segment matching the channel in which you want to send a campaign. For example:

     - (Default) Optimal Channel by CTR - mobile push
     - (Default) Optimal Channel by CTR - web push
     - (Default) Optimal Channel by CTR - email
     - (Default) Optimal Channel by CTR - sms
    

    Segment is based on scoring calculated in “optimal.channel” event. In its configuration we used the “Last” aggregate for ”optimal.channel” event with parameter “type:CTR”.

    • Expressions for all channels you want to use (e.g. email, sms, newsletter)

    • Metrics for all channels you want to use (e.g. email, sms, newsletter)

  2. Create an example expression for a newsletter ratio CTR

    In these analytics we have to calculate the ratio between clicked and sent messages, but in order to achieve a proper reference we require that those customers be sent at least 5 campaigns. It should look like below.

    Screenshot presenting campaign optimizer

For the calculation of the value of each channel, we can add the expression which meet the conditions described below:

  • Expressions for optimal individual channels are being compared if they are higher than the global metric​
  • If the Expression is less than 5, then its value equals 0​
  • If the Expression is lower than the metrics, then is not taken into consideration in comparison ​
  • If all expressions are lower than metrics, then we randomly select a channel​
  • If all expressions return 0, then we randomly select a channel

It can look like this:

<!-- candidates -->
{% set NEWSLETTER = {"name": "NEWSLETTER", "expression":0, "metric":0} %}
{% set MOBILE_PUSH = {"name": "MOBILE_PUSH", "expression":0, "metric":0}%}

{% set CANDIDATES = [NEWSLETTER, MOBILE_PUSH]%}

<!-- value assignment -->
{% expressionvar 37368423-6210-4ee4-bd67-5e2143544576 %}{% do
NEWSLETTER.update({"expression": expression_result})%}{%endexpressionvar%}
{metricsvar metric_id:550060f2-4feb-a6a5-46e8ad01b8ac%}{%do
NEWSLETTER.update({"metric_result})%}{% endmetricsvar %}
{% expressionvar 6e3206d9-708a-4fc5-bfe4-88fea18da90f %}{% do
MOBILE_PUSH.update({"expression_result})%}{% endexpressionvar %}
{% metricsvar metric_id:85651a3a-5163-4b1f-971a-4109e83bf753 %}{% do
MOBILE_PUSH.update ({"metric":metric_result})%}{% endmetricsvar %}

<!-- candidates by expression-->
{set expression_winners = [] %}
{% for candidat in CANDIDATES %}
    {% if candidat["expression"] > candidat ["metric"] %}
        {% do expression_winners.append(candidat)%}
    {% endif %}
{% endfor %}

<!-- print winner-->
{% if expression_winners|count !=0 %}
    {% set winner = expression_winners|sort(true, true, 'expression')|first %}
{% else %}
    {% set winner = CANDIDATES|random %}
{% endif %}

{{winner}}

Everything here is based on jinjava, which produced the event at the very end of this calculation. Based on that we can actually select the segment in which we want to send the message automatically.

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker