1. Help Center
  2. Getting Started
  3. First Steps and Best Practices

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. Before getting started, please be sure to review the prerequisites before getting started!

Pre-Requisites:

At a Glance

  1. Testing with the Cookie Rule
  2. Testing with the Current URL Rule
  3. Testing with the IP Address Rule

 

The Routes

  1. Testing with the Cookie Rule
    1. To set up the rule:
      1. Within the promotions page, navigate to the rules of the promotion by clicking on the rules icon located on the far left.
      2. Click on ‘Action’ then ‘Edit’. 
      3.  
        1. If in basic mode, click the “Switch to Advanced Mode” button at the bottom left corner. Then follow the steps 1 through 3 in Step b) below:
        2. If advanced mode, 
          1. Under “Custom Values”, click and drag in the “Matching Cookies Name/Value” rule. https://www.screencast.com/t/LMbu2uduA75W
          2. Enter the desired cookie name and value. In this example, my cookie name is called “ju_test”, and its value is “true”: https://www.screencast.com/t/r833t1XRUYw
          3. Click “OK”.
      4. Click “Publish”.
    2. To test:
      1. Open Chrome
      2. Visit https://my.justuno.com/login.html to login to your Justuno account.
      3. Navigate to the site from this window.
      4. Right Click > “Inspect”. Within the “Console” tab, enter the following:

jju_setCookie(“cookie_name”, cookie_value, 1)

NOTE: Replace the red text above with actual values. With my example rule, it would be:

jju_setCookie(“ju_test”, true, 1)

Video to assist with setting the cookie on site.

      1. Reset the session with the JU icon, then refresh the page. 
      2. Proceed with the actions necessary to trigger the promotion. 

 

  1. Testing with the URL Current Rule
    1. To set up the rule:
      1. Within the promotions page, navigate to the rules of the promotion by clicking on the rules icon located on the far left. 
      2. Click on Action > Edit
        1. If basic mode, 
          1. Select “On Specific Page”. 
          2. Under “Refine by Options” > “Show on specific page(s)”, select “Others”. 
          3. Within the field, enter /#test. Example: https://www.screencast.com/t/l3naxEwfVT
          4. Hit “Done”.
        2. If advanced mode, 
          1. Under “URL Based Rules”, click and drag in the “Current URL” rule. https://www.screencast.com/t/GtiNmgX89S8m
          2. Within the field, enter /#test. Example: https://www.screencast.com/t/fsbremIpYrm
          3. Hit “OK”
      3. Hit “Publish”
    2. To test:
      1. Open Chrome
      2. Visit https://my.justuno.com/login.html to login to your Justuno account.
      3. Navigate to the site from this window.
      4. At the end of the url of the site, add in /#test. NOTE: If site is www.yoursite.com, the test url should be www.yoursite.com/#test. EXAMPLE: https://www.screencast.com/t/txKqtOsCT
      5. Reset the session with the JU icon, then refresh the page. 
      6. Proceed with the actions necessary to trigger the promotion. 
  2. Testing with the IP Address Rule
    1. To set up the rule:
      1. Within the promotions page, navigate to the rules of the promotion by clicking on the rules icon located on the far left.
      2. Click on ‘Action’ then ‘Edit’. 
      3.  
        1. If in basic mode, click the “Switch to Advanced Mode” button at the bottom left corner. Then, follow steps 1 through 3 in Step b) below:
        2. If advanced mode, 
          1. Under “Technologicial Rules”, click and drag in the “IP Address” rule. https://www.screencast.com/t/gKJaz8BtSv
          2. Enter your IP address within the field. NOTE: To find your IP address, visit https://whatismyipaddress.com/. You can use IPv4 or IPv6, whichever is detected.
          3. Click “OK”.

Video to assist with setting up the IP Address rule.

      1. Click “Publish”.
    1. To test:
      1. Open Chrome
      2. Visit https://my.justuno.com/login.html to login to your Justuno account.
      3. Navigate to the site from this window.
      4. Reset the session with the JU icon. 
      5. Proceed with the actions necessary to trigger the promotion.