Using Targeting Rules to Restrict Views While Testing A Promotion Live

Are you needing to test a promotion on the site but not ready for your customers to see them? Here are three ways you might consider to achieve this.

At a glance:
Testing with a URL extension
Testing with the IP Address Rule
Advanced: Testing with the Cookie Rule


Last updated 8/5/2021

Intro


There will be times when the design of the promotion needs to be tested on the live site but is not ready to show to all customers. This article will go over different ways to restrict the promotion from appearing to everybody. We have ranked these on easiest to most advanced methods starting from top to bottom.

Testing with a URL extension


This method will set up a custom keyword that can be added to the URL to test. Only a user that has this extension can trigger the promotion. This setup can be done within the basic or advanced ruleset.

Basic rule setup

  1. Access the rule by creating a new rule or editing an existing rule
  2. Set the rule to show 'On Specific Page'
  3. Set to show on specific page URL 'contains' and in the field enter #test 
  4. Click Save and Publish

Below is an example of what this should look like:Show on specific page contains #test

Advanced rule setup

If an advanced rule is being used or preferred use these steps.

  1. Add the 'Current URL' rule under 'URL Based Rules'
  2. In the field enter #test
  3. Click save and publish
Here is an image of what this should look like:

advanced rule contains #test

Testing after setting up the rule


Once the rules are set up make sure to save and publish the rule changes. To trigger the promotion make sure to restart your session and head to your site with the extension.

Example: https://www.domain.com/#test

 

Testing with the IP Address Rule


A second option to test a promotion will be to set a rule that will target a specific user's IP address. This can only be done with advanced rules.

  1. Find your IP address. The easiest way is to Google "What is my IP address?"
  2. Set your rule to be advanced rules
  3. Once in the advanced rules, select “Technological Rules”
  4. Click and drag in the “IP Address” rule
  5. Paste your IP address from step 1 into the field
  6. Save and publish your promotion

    Screenshot 2021-08-05 105924

Testing after setting up the rule


Once the rules are set up make sure to save and publish the rule changes. To trigger the promotion make sure to restart your session and refresh your page


Testing with the Cookie Rule


A third option to test a promotion will be for more advanced use cases. This method will target a specific cookie on the site. This can only be done with advanced rules. These steps will give examples by using Google Chrome as it is the most popular browser.

  1. Set your rule to be advanced rules
  2. Once in the advanced rules, select the submenu “Custom Values”
  3. Click and drag in the “Matching Cookies Name/Value” rule. 
  4. Enter the desired cookie name and value. In this example, my cookie name is called ju_test and its value is true:justuno cookie rule to test
  5. Save and publish your promotion

Testing after setting up the rule


Once the rules are set up make sure to save and publish the rule changes. To trigger the promotion follow these steps:

  1. Make sure to restart your session and refresh your page.
  2. Use the Inspect tool and open the console
  3. The template for the cookie will be:
    jju_setCookie(“cookie_name”, cookie_value, 1)

    Any arbitrary values can be assigned to the cookie name.

  4. In our example we will use the following:
    jju_setCookie(“cookie_name”, cookie_value, 1)
  5. In the console enter your cookie data and this will trigger the promotion:
    custom cookie value in console


Vist Justuno @ Justuno.com