In this guide, we’ll look at how you can use nested Sub Rules to simplify complex journeys within Zephr.
For this example, we’ll provide distinct journeys for anonymous users based upon their traffic type:
- Users coming from a social referrer will receive one free view of content per day
- Users coming from a search referrer will have access to content to drive search results
- Users coming from direct traffic will see a hard registration form and need to register in order to view content
A Zephr Sub Rule allows you to add additional complexity to your rule, without taking up additional space on the canvas. They group complex series of decisions and can act as the endpoint/outcome of your rule or connect to other decision points within your main rule canvas.
Traffic Type Nested Rule
Sub Rules can be used in both Features and Redirects, and are implemented in the same way across each. For this example, start with a Feature rule for Article Content.
Once on the rule canvas, navigate to the Sub Rules menu item and drag the Sub Rule node onto your canvas. Name your Sub Rule “Traffic Type” and click Save.
This will open a new blank canvas, which is the canvas for your Traffic Type Sub Rule. Repeat this process, dragging a Sub Rule into your Traffic Type canvas. Name this Sub Rule “Social Referrer” and click Save.
You’ll now find yourself within a nested Sub Rule. We’ll use this Sub Rule to determine if a user is coming from a Social Referrer or not.
In your Social Referrer Sub Rule, click Advanced, then select the Referrer Decision Point.
Set this to Referer Contains facebook, then click the + icon in the top right of the modal.
Select Referrer type, and set this to Referer Contains twitter. You’ll notice a new option below to choose ‘And’ or ‘Or’ options for the boolean logic of the rule. Select Or for this example, so Zephr does a check to see if a user is coming from Facebook OR Twitter. Repeat the process until all the referrers you wish to check for have been added, then click Save.
Once saved, you’ll see a nested decision point on your canvas. Connect this to the Start Sub Rule node, then click Sub Rules and drag two Output Options onto your canvas.
Label one ‘Yes’, and one ‘No’, then connect these to the Yes and No options from your Referrer check.
With everything connected, you now have a Sub Rule that determines whether a user has come from a social referrer or another source. Click Done to return to your Traffic Type Sub Rule.
Back on your Traffic Type Sub Rule, you’ll see we can now distinguish when a user has come from a Social Referrer or not.
For those users not coming from social, we want to determine if they are coming from a Search source, or as Direct traffic. Navigate to the Advanced menu, and select Referrer again. This time, put in place two Referrer checks to see if a user is coming from Google or Bing, respectively.
Connect this referrer check to the ‘No’ outcome of your Social Referrer check.
With these decisions in place, we now have the information we need to determine where a user has come from. Select Sub Rules and create three Output Options – Social, Search, and Direct.
Connect the Social Output to the ‘Yes’ option in your Social Referrer Sub Rule. Connect the Search Output to the ‘Yes’ option of your Google & Bing Referrer check, and connect your Direct Output to the ‘No’ option of your Google & Bing Referrer check.
Once everything is connected, click Done, and you’ll return to your main rule screen.
You’ll now see a Traffic Sub Rule on your main rule page with options for Social, Search and Direct traffic. With these options, you can easily add journey options for users based upon their Traffic Type.
As we mentioned at the beginning of this guide, we want to give users coming from Social Channels one free view per day, so select the Access menu and add a Trial.
Set your Trial to allow one (1) view of content daily, then click Save. Connect this Trial to the Social Output from your Traffic Type Rule. On your Trial node, connect In Trial to a Show Article Outcome, and Trial Expired to a Registration Form Outcome.
Connect the Search Output to a Show Article Outcome so end-users being directed to your site through search channels are able to read your content.
Connect the Direct Output to a Registration Form Outcome, so all users coming direct to your site are required to login to view Article Content.
Once complete, save and publish your rule as required.
Zephr’s Sub Rules give you the ability to add many layers of complexity to your user journeys. For example, you may split your Sub Rules further to provide user journeys based not only on traffic type, but also on device or browser type. Add these layers of complexity where relevant, and trial what works best for your end-users.