This is a way to switch messages depending on the number of visits using the theme section in Shopify without using an app. Liquid cannot access cookies or localStorage, so you have to use Javascript, but this is an example of how to set it up.
How to switch messages depending on the number of visits (using Javascript since Liquid cannot reference cookies or localStorage)

Add your customized Liquid section to the template where you want it to appear and insert the code.

