Cookied based on email link

Hi there. Is it possible to set a cookie when a user (who has already subscribed) arrives at a page on a site via an email link (so that they do not get shown any popups)?

This would be useful because once cookies are cleared (which will probably happen eventually), the browser will not know that the user has previously signed up and will offer signup again - which will be particularly irritating to the user since they are cleared signed up as they arrived from an email link.

I trust my question makes sense. Thanks, Peter

Yes, with some custom Javascript. However, not all users will give cookie consent, so you cannot rely on this to work 100%.

Theoretically, however it depends on how you trigger your popups. If you’re doing it with Interactions, it will be a bit tricky to suppress those interactions when the cookie is present.

Yes, again, cookies are unreliable, and what if they try to access your site from a different PC or their phone? No cookie.

This is what membership systems are for. Have them login, and then logged-in users don’t get spammed with pop-ups.

Thanks for the swift response, Michael (memetican). Everything you say makes sense and I understand that there will be occasions when cookies don’t work - my main concern is that it’s very irritating to be offered a subscribe popup when you’ve arrived at the site via an email link and have clearly already subscribed.

The cookies I’m talking about would prevent an on-load popup (which only appears the first time a user visits the site but which would appear again if they clear their cache) as well as a time-based popup (say every two weeks).

I don’t want to go the member route - my site will not be the kind of site users would be happy to log on to - so some javascript would be very much appreciated. I imagine that the script would set a cookie based on the URL generated by the email link but I have no clear idea about how to do so.

Thanks again for your help.

How does that happen?

If you’re using a pop-up provider that uses cookie-suppression, you won’t be able to create cookies for their domain using your script. That would be a security problem. Only their domain can access their cookies.

If you are using a cookie that you’ve created on your own domain to trigger a local script that you’ve written, you could potentially delete the pop-up HTML/script entirely.

I’d definitely build that suppression part first, because it’s the unknown part. The rest is just URL parsing and cookie creation.

Regarding the URL-to-cookie part, I don’t have any scripts handy to give you, but the Internet is full of them. Google is your friend there.

Here’s how to parse the querystring

And how to create and read your cookie