mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 18:52:14 +03:00
Reverted change in post email serializer
refs d4540012dc
This was committed by accident
This commit is contained in:
parent
220af3b276
commit
9d27014aff
@ -358,17 +358,13 @@ const PostEmailSerializer = {
|
||||
// Now replace the links in the HTML version
|
||||
if (!options.isBrowserPreview && !options.isTestEmail && settingsCache.get('email_track_clicks')) {
|
||||
result.html = await linkReplacer.replace(result.html, async (url) => {
|
||||
// Add newsletter source attribution
|
||||
url = memberAttribution.service.addEmailSourceAttributionTracking(url, newsletter);
|
||||
const isSite = urlUtils.isSiteUrl(url);
|
||||
|
||||
if (isSite) {
|
||||
url = memberAttribution.service.addEmailSourceAttributionTracking(url, newsletter);
|
||||
|
||||
// Only add post attribution to our own site (because external sites could/should not process this information)
|
||||
url = memberAttribution.service.addPostAttributionTracking(url, post);
|
||||
} else {
|
||||
// For external sites, add ref to the site URL instead of newsletter
|
||||
const siteUrl = new URL(urlUtils.urlFor('home', true));
|
||||
url.searchParams.append('ref', siteUrl.hostname);
|
||||
}
|
||||
|
||||
// Add link click tracking
|
||||
|
Loading…
Reference in New Issue
Block a user