Wagxperience comes with a base set of rules that allow you to start segmenting your visitors quickly.
The time rule allows you to segment visitors based on the time of their visit. Define a time frame in which visitors are matched to this segment.
|Start time||The start time of your time frame.|
|End time||The end time of your time frame.|
The day rule allows you to segment visitors based on the day of their visit. Select one or multiple days on which you would like your segment to be applied.
|Monday||Matches when the visitors visits on a monday.|
|Tuesday||Matches when the visitors visits on a tuesday.|
|Wednesday||Matches when the visitors visits on a wednesday.|
|Thursday||Matches when the visitors visits on a thursday.|
|Friday||Matches when the visitors visits on a friday.|
|Saturday||Matches when the visitors visits on a saturday.|
|Sunday||Matches when the visitors visits on a sunday.|
The referral rule allows you to match visitors based on the website they were referred from. For example:
|Regex string||The regex string to match the referral header to.|
Visit count rule
The visit count rule allows you to segment a visitor based on the amount of visits per page. Use the operator to to set a maximum, minimum or equal amount of visits.
|Page||The page on which visits will be counted.|
|Count||The amount of visits to match.|
|Operator||Whether to match for more than, less than or equal to the specified visit count.|
The query rule allows you to match a visitor based on the query included in the url. It let's you define both the parameter and the value. It will look something like this:
|Parameter||The first part of the query ('campaign').|
|Value||The second part of the query ('ourbestoffer').|
The device rule allows you to match visitors by the type of device they are using. You can select any combination you want.
|Mobile phone||Matches when the visitor uses a mobile phone.|
|Tablet||Matches when the visitor uses a tablet.|
|Desktop||Matches when the visitor uses a desktop.|
User is logged in rule
The user is logged in rule allows you to match visitors that are authenticated and logged in to your app.
|Is logged in||Whether the user is logged in or logged out.|
Origin country rule
The origin country rule allows you to match visitors based on the origin country of their request. This rule requires to have set up a way to detect countries beforehand.
|Country||What country user's request comes from.|
You must have one of the following configurations set up in order to make it work.
Cloudflare IP Geolocation -
cf-ipcountryHTTP header set with a value of the alpha-2 country format.
CloudFront Geo-Targeting -
cloudfront-viewer-countryheader set with a value of the alpha-2 country format.
The last fallback is to use GeoIP2 module that is included with Django. This requires setting up an IP database beforehand, see the Django's GeoIP2 instructions for more information. It will use IP of the request, using HTTP header the
x-forwarded-forHTTP header and
REMOTE_ADDRserver value as a fallback. If you want to use a custom logic when obtaining IP address, please set the
WAGTAIL_PERSONALISATION_IP_FUNCTIONsetting to the function that takes a request as an argument, e.g.
# settings.py WAGTAIL_PERSONALISATION_IP_FUNCTION = 'yourproject.utils.get_client_ip' # yourproject/utils.py def get_client_ip(request): return request['HTTP_CF_CONNECTING_IP']