Ghost/ghost/member-attribution
Simon Backx 972c25edc7
Wired up member attribution from email clicks (#15407)
refs https://github.com/TryGhost/Team/issues/1899

- Added `addEmailAttributionToUrl` method to MemberAttributionService. This adds both the source attribution (`rel=newsletter`) and member attribution (`?attribution_id=123&attribution_type=post`) to a URL.
- The URLHistory can now contain a new sort of items: `{type: 'post', id: 'post-id', time: 123}`.
- Updated frontend script to read `?attribution_id=123&attribution_type=post` from the URL and add it to the URLHistory + clear it from the URL.
- Wired up some external dependencies to LinkReplacementService and added some dummy code.
- Increased test coverage of attribution service
- Moved all logic that removes the subdirectory from a URL to the UrlTranslator instead of the AttributionBuilder
- The UrlTranslator now parses a URLHistoryItem to an object that can be used to build an Attribution instance
- Excluded sites with different domain from member id and attribution tracking
2022-09-14 15:50:54 -04:00
..
lib Wired up member attribution from email clicks (#15407) 2022-09-14 15:50:54 -04:00
test Wired up member attribution from email clicks (#15407) 2022-09-14 15:50:54 -04:00
.eslintrc.js Added member attribution events and storage (#15243) 2022-08-18 17:38:42 +02:00
index.js Moved attribution event handler to events service (#15379) 2022-09-07 16:41:59 +02:00
package.json Added member attribution events and storage (#15243) 2022-08-18 17:38:42 +02:00
README.md Added member attribution events and storage (#15243) 2022-08-18 17:38:42 +02:00

Member Attribution

Usage

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests