: How to pass information across domains to ask for newsletter only once? Lets assume following scenario, I have two sites: example1.com example2.com When user visits 1 there is a prompt "please
Lets assume following scenario, I have two sites:
example1.com
example2.com
When user visits 1 there is a prompt "please signup to a newsletter". Same thing happens when user visits 2.
However when navigating from 1 to 2 I don't want signup form to be shown.
My first thought were 3rd-party cookies, but it seems that they are blocked / not working:
stackoverflow.com/questions/4701922/how-does-facebook-set-cross-domain-cookies-for-iframes-on-canvas-pages?rq=1 https://stackoverflow.com/questions/172223/how-do-i-set-cookies-from-outside-domains-inside-iframes-in-safari?rq=1
Another thought is to append #noshow for each URL but that would require some work - for instance a script that would intercept click / tap events and modify URL structure depending on the address. (but that seems hacky)
I wonder if you know a robust well-established solution to this issue?
Thanks
More posts by @Annie201
1 Comments
Sorted by latest first Latest Oldest Best
At this time I am unaware of any browser allowing domains to access local data stores of other domains. (cookies, html 5 local storage, flash objects). The simplest option here is to serve up your news letter prompt via JavaScript from just one of the domains. If the visitor is blocking third party cookies (their choice) then there is not much you can do about that and they'll see the prompt again.
A more complex option is to serve the JavaScript up via what ever server side language you are using (PHP?) and have the PHP script store their IP/User Agent hash in Memcache. If the hash is already there then don't show the visitor your news letter prompt.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.