In this article: About the cookie condition| Types of cookie-based content | How to set up cookie-based content using If-So
The cookie condition allows you to display dynamic content to users visiting your site based on a cookie name, cookie value, or both.
This option was created to allow site admins and developers to create dynamic content based on cookies that are already in use by the website, whether they are created by a 3rd-party plugin or using a custom code. It can be used to interact with users based on previous interactions they have had with your site and allows you to give your visitors a more personalized experience.
With If-So you can easily display dynamic content based on a cookie name, a cookie value, or both.
Cookie Name: Fill in the cookie name field and leave the cookie value field blank. The dynamic content will be displayed if a cookie with the exact name exists in the user’s browser, regardless of its value.
Cookie Value: Fill in the cookie value field and leave the name field blank. The dynamic content will be displayed if a cookie with the exact value exists in the user’s browser, regardless of its name
Cookie Name and Cookie Value: Fill in both the cookie name and the cookie value. The dynamic version will be displayed only if the cookie in the user’s browser matches both the name and value you have set.
If-So allows you to add, remove, or change a value of a cookie if based on the users’ interaction with the site. To learn more:
Whether you are using a caching plugin or server caching, you can navigate to the plugin settings and enable the "Page Caching Compatibility" option. With the option enabled, dynamic triggers will be rendered in a separate request that will take place after the loading of the cached version.