Conditions/features in use: Cookie (or page URL) & Trigger Events Extension
Watch it in action
Click the genie lamp once, twice, thrice…
After the third click, a cookie will be added to your browser, and you’ll be redirected to our plans page. A custom offer will be displayed to you since you have the cookie on your browser.
In our example, we delete the cookie right when you visit the offer page. However, the cookie’s expiration time can be set by you to decide how long the discounted offer will be available.
You can also set a countdown timer that will start counting down from the moment the offer is revealed to the user for the first time.
Applying the secret discount on your website
No coding is required!
- Wrap any element with our “Assign a cookie on click” shortcode to set it as the “hidden” element that should be clicked.
- Create a trigger with a cookie condition and the content you wish to display to users who click the element.
The “Assign a cookie on click” shortcode
The “Assign a cookie on click” shortcode allows you to wrap any element to function as the element users should click on.
[ifso_onclick_redirect url='https://www.if-so.com/plans' clicks='3' cookie_name='gennie' cookie_value='yes' expires='1'] Your element [/ifso_onclick_redirect]
The shortcode allows you to set the number of times users need to click the element, the page they will be redirected to after clicking it, and the cookie name, value, and expiration time assigned on click.
URL – the URL users will be redirected to.
clicks – the number of times users should click the element for the action to take place.
cookie_name – the name of the cookie that will be assigned. The cookie will trigger the dynamic content in the next step.
cookie_value – the value of the cookie that will be assigned.
expired – the cookie expiration time in seconds.
The “Add a cookie on click” shortcode functionality is part of the trigger events extension. You can learn more and download it here.
Setting up the dynamic (secret) content
The dynamic content is displayed using a simple cookie condition. Using Elementor or Gutenberg, you can create a conditional element or block. If you are using any other builder, simply create an If-So trigger.
Below is a screenshot showing the trigger we used to create the example on this page.
Note that when you set the condition, the cookie name and value should be similar to the ones you have set in your “add a cookie on click” shortcode.