Since 3rd party cookies are going the way of Friendster, my plans are gonna have to change :-(
I have about 60 domains parked on top of the main domain, and I show different content based on the domain. But I was planning to start diverting at least all mobile users from the parked domain to the main domain, with the theory that a single domain with 15 million monthly pageviews might be worth more to Adsense than 60 domains with the same traffic spread out.
Since the users can log in to each domain separately, I was adding a bit of Javascript to the footer of each page to set a logged-in cookie on the main domain:
// getCookie() and setCookie() are separate functions I've been using for years)
// on the parked domain
<script>
var username = getCookie('username');
</script>
<script src='https://www.example.com/login.js'></script>
// login.js on the main domain
if (!getCookie('username')
// cookie_name, cookie_value, days before expiration
setCookie('username', username, 365);
But I guess that this isn't going to work, now that 3rd party cookies are being blocked?
So can you guys and gals suggest another way that I might log the user in across domains? I can work with PHP or Javascript, and I'm using Apache if it matters.