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 01/04/2022
Introduction
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
- Access the rule by creating a new rule or editing an existing rule
- Set the rule to show 'On Specific Page'
- Set to show on specific page URL 'contains' and in the field enter #test
- Click Save and Publish
Below is an example of what this should look like:
Advanced rule setup
If an advanced rule is being used or preferred use these steps.
- Add the 'Current URL' rule under 'URL Based Rules'
- In the field enter #test
- Click save and publish
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.
- Find your IP address. The easiest way is to Google "What is my IP address?"
- Set your rule to be advanced rules
- Once in the advanced rules, select “Technological Rules”
- Click and drag in the “IP Address” rule
- Paste your IP address from step 1 into the field
- 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 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.
- Set your rule to be advanced rules
- Once in the advanced rules, select the submenu “Custom Values”
- Click and drag in the “Matching Cookies Name/Value” rule.
- Enter the desired cookie name and value. In this example, my cookie name is called ju_test and its value is true:
- 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:
- Make sure to restart your session and refresh your page.
- Use the Inspect tool and open the console
- The template for the cookie will be:
jju_setCookie(“cookie_name”, cookie_value, 1)
Any arbitrary values can be assigned to the cookie name.
- In our example we will use the following:
jju_setCookie(“cookie_name”, cookie_value, 1)
- In the console enter your cookie data and this will trigger the promotion:
Vist Justuno @ Justuno.com