{% load i18n %} {% load wagtailadmin_tags %} {{ self.formset.management_form }} {% comment %} BEGIN CUSTOM TEMPLATE LOGIC Add formsets for Segmentation Rules {% endcomment %} {% if 'wagtail_personalisation_' in self.formset.prefix or 'forms_' in self.formset.prefix %} {% blocktrans with heading=self.heading|lower %}

{{ heading }}

{% endblocktrans %} {% if self.formset.prefix == 'wagtail_personalisation_timerule_related' %}

{% blocktrans %} This rule is based on the time of the visit of the users. If they visit in between the provided period, they will be segmented. If the "Persistent" option is not selected, the rule will be only valid between the specified times. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'wagtail_personalisation_dayrule_related' %}

{% blocktrans %} This rule is based on the weekday of the visit of the users. If they visit on the weekday selected, they will be segmented. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'wagtail_personalisation_referralrule_related' %}

{% blocktrans %} This rule allows you to match visitors based on the website they were referred from in form of a regex string, e.g. "example\.com|secondexample\.com|.*subdomain\.com". {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'wagtail_personalisation_visitcountrule_related' %}

{% blocktrans %} This rule allows you to segment a visitor based on the amount of visits per page. Use the operator to set a maximum, minimum or equal amount of visits. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'wagtail_personalisation_queryrule_related' %}

{% blocktrans %} This rule allows you to set a parameter in a URL that would activate the segment. You could give that link to a particular group of people and if they accessed it, they would be segmented, e.g. "http://example.com/?some_parameter=abc" where "some_parameter" would be the parameter and "abc" would be the value. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'wagtail_personalisation_devicerule_related' %}

{% blocktrans %} This rule allows to serve different content to users of different device types. Please remember that the detection is not always 100% accurate. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'wagtail_personalisation_userisloggedinrule_related' %}

{% blocktrans %} This rule allows you to segment content based on whether a user is logged in {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'forms_formsubmissiondatarule_related' %}

{% blocktrans %} This rule allows you to segment content to users based on their previous answers to forms. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'forms_groupmembershiprule_related' %}

{% blocktrans %} This rule allows you to segment content to users based on their group membership. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'forms_articletagrule_related' %}

{% blocktrans %} This rule allows you to segment users that visited a certain number of unique articles with a specific tag during a specified time period, e.g. you can segment users who visited more than 3 articles with the “health” tag between January and March this year. {% endblocktrans %}

{% endif %} {% if self.formset.prefix == 'forms_combinationrule_related' %}

{% blocktrans %} Use the Rule Combination to connect the defined rules with a combination of AND/OR statements. Include the statements that you want to be calculated first as Nested Logic as this will place the statements in parentheses. If you do not use Nested Logic, the system will read the combination in order from top to bottom. {% endblocktrans %}

{% blocktrans %} Once you’ve activated the Rule Combination, be sure to include all the rules that you want to use to create your segments. Any defined rules that are not included in the Rule Combination will not contribute to the results of your segment. {% endblocktrans %}

{% blocktrans %} Note: {% endblocktrans %}
{% blocktrans %} AND will narrow the results of your segment, {% endblocktrans %}
{% blocktrans %} OR will broaden the results of your segment. {% endblocktrans %}

{% endif %} {% endif %} {# END CUSTOM TEMPLATE LOGIC #}

{% blocktrans with heading=self.heading|lower %}Add {{ heading }}{% endblocktrans %} {# BEGIN CUSTOM TEMPLATE LOGIC #}

{% if 'wagtail_personalisation_' in self.formset.prefix or 'forms_' in self.formset.prefix %}
{% endif %} {# END CUSTOM TEMPLATE LOGIC #}