diff --git a/ghost/admin/app/components/gh-member-details.hbs b/ghost/admin/app/components/gh-member-details.hbs index f3c6497d06..946913419d 100644 --- a/ghost/admin/app/components/gh-member-details.hbs +++ b/ghost/admin/app/components/gh-member-details.hbs @@ -73,7 +73,7 @@

{{svg-jar "earth"}} - Coming from 

Twitter / Social

+ Coming from 

{{this.referrerAttribution.source}} / {{this.referrerAttribution.medium}}

{{/if}} diff --git a/ghost/admin/app/components/gh-member-details.js b/ghost/admin/app/components/gh-member-details.js index 2b0d1585ca..ff0d34d89b 100644 --- a/ghost/admin/app/components/gh-member-details.js +++ b/ghost/admin/app/components/gh-member-details.js @@ -3,4 +3,12 @@ import {inject as service} from '@ember/service'; export default class extends Component { @service settings; -} \ No newline at end of file + + get referrerAttribution() { + const attribution = this.args.member?.attribution; + return { + source: attribution?.referrer_source || 'Unknown', + medium: attribution?.referrer_medium || '-' + }; + } +} diff --git a/ghost/admin/app/components/gh-member-settings-form.hbs b/ghost/admin/app/components/gh-member-settings-form.hbs index 87268d796e..cb9e71b3ca 100644 --- a/ghost/admin/app/components/gh-member-settings-form.hbs +++ b/ghost/admin/app/components/gh-member-settings-form.hbs @@ -217,7 +217,7 @@

Subscription Source

-

Twitter / Social

+

{{sub.attribution.referrerSource}} / {{sub.attribution.referrerMedium}}

{{#if (and sub.attribution sub.attribution.url sub.attribution.title)}}
diff --git a/ghost/admin/app/components/gh-member-settings-form.js b/ghost/admin/app/components/gh-member-settings-form.js index b4fda70a53..1358d21255 100644 --- a/ghost/admin/app/components/gh-member-settings-form.js +++ b/ghost/admin/app/components/gh-member-settings-form.js @@ -73,6 +73,11 @@ export default class extends Component { }).map((sub) => { const data = { ...sub, + attribution: { + ...sub.attribution, + referrerSource: sub.attribution?.referrer_source || 'Unknown', + referrerMedium: sub.attribution?.referrer_medium || '-' + }, startDate: sub.start_date ? moment(sub.start_date).format('D MMM YYYY') : '-', validUntil: sub.current_period_end ? moment(sub.current_period_end).format('D MMM YYYY') : '-', cancellationReason: sub.cancellation_reason,