Files
Steve Larson ef059364dc Updated member attribution to use session instead of local storage (#24726)
ref https://linear.app/ghost/issue/PROD-1976/
- changed from localStorage to sessionStorage
- added missing /apps/ packages to shipping workflow

In an effort to be more GDPR compliant - and to avoid pop-ups out of the
box - we're changing the attribution script to use session storage.

This should have minimal impact as we send the attribution object on the
signup request from Portal/signup form. So even though the user needs to
check their email to verify their email and click the magic link, the
magic link contains the attribution data in the JWT, rather than pulling
the data after the magic link click. This would otherwise be problematic
as magic links open in a new tab (ie new session).

There will be a brief cutover as we didn't choose to copy-forward or add
handling for the local storage values. Given that we only have 24h
lookback anyways, moving to session storage without addtl handling seems
acceptable.

__Release Changes__
We [introduced](https://github.com/TryGhost/Ghost/pull/22127) a new
script for shipping the /apps/ a while back. Other apps were added
later, but incrementally, instead of adding all of them once the test
was proven to work. The `ci.yml` and `release-apps.js` changes
incorporate the missing apps.

__Testing__
- [ ] Ensure page views are saving data to session storage, NOT local
storage
- [ ] Ensure attribution is working appropriately (sign up a member on a
post or homepage, visit Admin > Members > member to confirm)
2025-08-21 17:34:00 -05:00

216 lines
7.8 KiB
JavaScript
Executable File