Ghost/ghost
Simon Backx c4ea36cfde
Added member attribution script (#15242)
refs https://github.com/TryGhost/Team/issues/1804

- Adds a script that is only injected when the member attribution alpha flag is enabled
- This script builds a history and saves it in localStorage as `ghost-history` that contains something like this: 
``` json
[
    {
       "time": 1660650730,
        "path": "/about/"
   },
   {
        "time": 1660651730,
       "path": "/welcome/"
    }
]
```

- Keeps track of the time of every page visit, so we can correctly remove old items. I also considered saving the time separately and clearing the whole history when the saved time is older than 24h, but that would have the side effect that items older than 24h might leak into the history if you visit every 12 hours (to give an example). Plus, having objects in the history might make it easier to add other attributes to the items if we ever want to do that in the future. We also have access to the time between visits.
- Added `.eslintrc` configuration for this new frontend script. This makes it easier to spot errors when developing, and follow the same syntax rules as other scripts. In the future it can allow us to require an older ECMA version in the browser script. If we like this pattern, we could also use it for other frontend scripts.
2022-08-16 15:44:51 +02:00
..
adapter-manager Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
admin Fixed tier card dropdown link bug 2022-08-16 14:27:22 +02:00
api-framework Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
api-version-compatibility-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
bootstrap-socket Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
constants Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
core Added member attribution script (#15242) 2022-08-16 15:44:51 +02:00
custom-theme-settings-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
domain-events Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
email-analytics-provider-mailgun Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
email-analytics-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
email-content-generator Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
express-dynamic-redirects Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
extract-api-key Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
html-to-plaintext Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
job-manager Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
magic-link Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
mailgun-client Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
member-analytics-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
member-events Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
members-analytics-ingress Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
members-api Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
members-csv Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
members-events-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
members-importer Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
members-ssr Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
minifier Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
mw-api-version-mismatch Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
mw-cache-control Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
mw-error-handler Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
mw-session-from-token Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
mw-update-user-last-seen Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
mw-vhost Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
oembed-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
offers Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
package-json Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
payments Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
security Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
session-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
settings-path-manager Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
stripe Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
update-check-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
verification-trigger Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
version-notifications-data-service Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00