Ghost/ghost/link-redirects
Simon Backx 4c5ba4ed7d
Added database storage for link redirects and click events (#15423)
closes https://github.com/TryGhost/Team/issues/1916 
closes https://github.com/TryGhost/Team/issues/1917

- Added database storage for link redirects and click events via repositories (hides away database layer) defined in the wrapper services
    - Added LinkClickRepository to store click events to database
    - Added LinkRedirectRepository to store link redirects to database
    - Added PostLinkRepository to link LinkRedirects with posts
- Renamed link-replacement package to link-replacer, and made it dependency less (it only replaces links now, doesn't do anything else)
- The link-tracking service has a new `addTrackingToUrl` which returns a new URL that includes tracking. The new `addRedirectToUrl` method does the same but without tracking for now.
- MEGA service now uses the link-replacer to replace links in the emails using a combination of different services (member attribution + link-tracking service)
2022-09-19 17:12:54 +02:00
..
lib Added database storage for link redirects and click events (#15423) 2022-09-19 17:12:54 +02:00
test Added initial link-redirects package 2022-09-14 13:24:17 -04:00
.eslintrc.js Added initial link-redirects package 2022-09-14 13:24:17 -04:00
index.js Added initial link-redirects package 2022-09-14 13:24:17 -04:00
package.json Wired up link redirects & tracking (#15418) 2022-09-16 10:42:21 +02:00
README.md Added initial link-redirects package 2022-09-14 13:24:17 -04:00

Link Redirects

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