Hi! We are looking to show a different homepage based on whether the user has visited our other site. I wanted to double check the way I am currently doing it and see if anyone had a better way. Currently, I am setting a cookie in Google Tag Manager based on whether the user has visited our other site. In Webflow, I am checking the cookie and if it is set I am using JavaScript to redirect the user. If anyone had any thoughts or better way of doing things, it would be super helpful!
It will depend on exactly what you’re trying to do.
Cookie + Javascript is a simpler approach, you can redirect or you can hide/show different parts of the page depending on the cookie setting.
A more advanced approach is to reverse-proxy your site, so that / delivers one of several homepages depending on that cookie setting.
Note that you need a way to create the cookie as well. GTM could work, but to ensure you main site can access the cookie, I’d setup a special link on your main site, with a querystring, and some JS to create the cookie. Then IFRAME that as a 1x1 pixel on the sites you’re tracking. The trackable URL would look something like;