mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Updated newsletter attribution to use the name rather than slug
The slug from the fixtures is "default-newsletter" which doesn't correctly reflect the name of most sites newsletters. Because we're using the URL constructor it handles all of the URL encoding/decoding on both ends for us.
This commit is contained in:
parent
99e6f8ddda
commit
a05ef5ef95
@ -34,7 +34,8 @@ class MemberAttributionService {
|
||||
addEmailSourceAttributionTracking(url, newsletter) {
|
||||
// Create a deep copy
|
||||
url = new URL(url);
|
||||
url.searchParams.append('ref', newsletter.get('slug') + '-newsletter');
|
||||
// We slugify the name here so that we don't use the default slugs in fixtures
|
||||
url.searchParams.append('ref', newsletter.get('name') + '-newsletter');
|
||||
return url;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user