Target groups
Target groups make it possible to categorize anonymous visitors into segments. Once categorized, your website can be built to display different promotions and different content to different target groups.
Implementing a custom target group condition
Please read more about sample implementation of a custom target group condition here.
The custom condition implemented in this sample is a referer condition. The condition checks if the referer contains a specific string.
The zip file contains the following files:
- TargetGroupReferrerFilterCondition.cs: The filter condtion object, which you can use to define your own fields.
- TargetGroupReferrerFilterServic.cs: Used to edit the TargetGroupReferrerFilterCondition object in back office.
- TargetGroupMapper.cs: Maps TargetGroupReferrerFilterCondition to TargetGroupFilterConditionModel.
- ReferrerCondition.cs: Processes the TargetGroupReferrerFilterCondition. Here you define how the condition will be applied. The condtion in this sample is applied only with a TargetEvent, since it is fired only when a new session is created. Browse from a referer so that the UrlReferrer has a value. For testing you will need to delete browser session in order to see the condition trigger.
Use resource files in order to translate the label of the custom condtion shown in back office (see image below). Create your own resource files in the solution so that they will not be overwritten with future updates.

The sample custom referer condition looks like this in back office.
