mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
Wired referrer information on member detail page
refs https://github.com/TryGhost/Ghost/pull/15463
This commit is contained in:
parent
6c85c75b86
commit
e5fb7b805f
@ -73,7 +73,7 @@
|
||||
</p>
|
||||
<p>
|
||||
{{svg-jar "earth"}}
|
||||
Coming from <p title="Social: Twitter">Twitter / Social</p>
|
||||
Coming from <p title="Social: Twitter">{{this.referrerAttribution.source}} / {{this.referrerAttribution.medium}}</p>
|
||||
</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -3,4 +3,12 @@ import {inject as service} from '@ember/service';
|
||||
|
||||
export default class extends Component {
|
||||
@service settings;
|
||||
}
|
||||
|
||||
get referrerAttribution() {
|
||||
const attribution = this.args.member?.attribution;
|
||||
return {
|
||||
source: attribution?.referrer_source || 'Unknown',
|
||||
medium: attribution?.referrer_medium || '-'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@
|
||||
<div class="gh-membertier-details">
|
||||
<div class="gh-membertier-detail">
|
||||
<h4>Subscription Source</h4>
|
||||
<p><span class="fw6">Twitter / Social</span></p>
|
||||
<p><span class="fw6">{{sub.attribution.referrerSource}} / {{sub.attribution.referrerMedium}}</span></p>
|
||||
</div>
|
||||
{{#if (and sub.attribution sub.attribution.url sub.attribution.title)}}
|
||||
<div class="gh-membertier-detail">
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user