mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Renamed paid_signups to paid_conversions in post metrics export
no issue
This commit is contained in:
parent
147e0cc0d5
commit
37397e88b6
3 changed files with 17 additions and 17 deletions
|
@ -879,7 +879,7 @@ Object {
|
|||
"access-control-allow-origin": "http://127.0.0.1:2369",
|
||||
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
||||
"content-disposition": StringMatching /\\^Attachment; filename="posts\\.\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}\\.csv"\\$/,
|
||||
"content-length": "2511",
|
||||
"content-length": "2515",
|
||||
"content-type": "text/csv; charset=utf-8",
|
||||
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
|
||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||
|
@ -890,7 +890,7 @@ Object {
|
|||
|
||||
exports[`Posts API Export Can export 2 1`] = `
|
||||
Object {
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_signups
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_conversions
|
||||
Start here for a quick overview of everything you need to know,http://127.0.0.1:2369/welcome/,Ghost,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,false,Getting Started,Public,,,,,0,0
|
||||
Customizing your brand and design settings,http://127.0.0.1:2369/design/,Ghost,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,false,Getting Started,Public,,,,,0,0
|
||||
\\"Writing and managing content in Ghost, an advanced guide\\",http://127.0.0.1:2369/write/,Ghost,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,false,Getting Started,Public,,,,,0,0
|
||||
|
@ -910,7 +910,7 @@ Object {
|
|||
"access-control-allow-origin": "http://127.0.0.1:2369",
|
||||
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
||||
"content-disposition": StringMatching /\\^Attachment; filename="posts\\.\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}\\.csv"\\$/,
|
||||
"content-length": "544",
|
||||
"content-length": "548",
|
||||
"content-type": "text/csv; charset=utf-8",
|
||||
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
|
||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||
|
@ -921,7 +921,7 @@ Object {
|
|||
|
||||
exports[`Posts API Export Can export with filter 2 1`] = `
|
||||
Object {
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_signups
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_conversions
|
||||
\\"Not so short, bit complex\\",http://127.0.0.1:2369/not-so-short-bit-complex/,Joe Bloggs,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,true,,Public,,,,,0,0
|
||||
Short and Sweet,http://127.0.0.1:2369/short-and-sweet/,Joe Bloggs,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,true,chorizo,Public,,,,,0,0",
|
||||
}
|
||||
|
@ -932,7 +932,7 @@ Object {
|
|||
"access-control-allow-origin": "http://127.0.0.1:2369",
|
||||
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
||||
"content-disposition": StringMatching /\\^Attachment; filename="posts\\.\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}\\.csv"\\$/,
|
||||
"content-length": "381",
|
||||
"content-length": "385",
|
||||
"content-type": "text/csv; charset=utf-8",
|
||||
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
|
||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||
|
@ -943,7 +943,7 @@ Object {
|
|||
|
||||
exports[`Posts API Export Can export with limit 2 1`] = `
|
||||
Object {
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_signups
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_conversions
|
||||
Start here for a quick overview of everything you need to know,http://127.0.0.1:2369/welcome/,Ghost,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,false,Getting Started,Public,,,,,0,0",
|
||||
}
|
||||
`;
|
||||
|
@ -953,7 +953,7 @@ Object {
|
|||
"access-control-allow-origin": "http://127.0.0.1:2369",
|
||||
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
||||
"content-disposition": StringMatching /\\^Attachment; filename="posts\\.\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}\\.csv"\\$/,
|
||||
"content-length": "2511",
|
||||
"content-length": "2515",
|
||||
"content-type": "text/csv; charset=utf-8",
|
||||
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
|
||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||
|
@ -964,7 +964,7 @@ Object {
|
|||
|
||||
exports[`Posts API Export Can export with order 2 1`] = `
|
||||
Object {
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_signups
|
||||
"text": "title,url,author,status,created_at,updated_at,published_at,featured,tags,post_access,email_recipients,sends,opens,clicks,free_signups,paid_conversions
|
||||
HTML Ipsum,http://127.0.0.1:2369/html-ipsum/,Joe Bloggs,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,false,\\"kitchen sink, bacon\\",Public,,,,,0,0
|
||||
Ghostly Kitchen Sink,http://127.0.0.1:2369/ghostly-kitchen-sink/,Joe Bloggs,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,false,\\"kitchen sink, bacon\\",Public,,,,,0,0
|
||||
Short and Sweet,http://127.0.0.1:2369/short-and-sweet/,Joe Bloggs,published and emailed,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,2050-01-01T00:00:00.000Z,true,chorizo,Public,,,,,0,0
|
||||
|
|
|
@ -88,7 +88,7 @@ class PostsExporter {
|
|||
opens: trackOpens ? (email?.get('opened_count') ?? null) : null,
|
||||
clicks: showEmailClickAnalytics ? (post.get('count__clicks') ?? 0) : null,
|
||||
free_signups: membersTrackSources && published ? (post.get('count__signups') ?? 0) : null,
|
||||
paid_signups: membersTrackSources && paidMembersEnabled && published ? (post.get('count__paid_conversions') ?? 0) : null,
|
||||
paid_conversions: membersTrackSources && paidMembersEnabled && published ? (post.get('count__paid_conversions') ?? 0) : null,
|
||||
reacted_with_more_like_this: feedbackEnabled ? (post.get('count__positive_feedback') ?? 0) : null,
|
||||
reacted_with_less_like_this: feedbackEnabled ? (post.get('count__negative_feedback') ?? 0) : null
|
||||
};
|
||||
|
@ -117,9 +117,9 @@ class PostsExporter {
|
|||
}
|
||||
|
||||
if (!membersTrackSources || !membersEnabled) {
|
||||
removeableColumns.push('free_signups', 'paid_signups');
|
||||
removeableColumns.push('free_signups', 'paid_conversions');
|
||||
} else if (!paidMembersEnabled) {
|
||||
removeableColumns.push('paid_signups');
|
||||
removeableColumns.push('paid_conversions');
|
||||
}
|
||||
|
||||
for (const columnToRemove of removeableColumns) {
|
||||
|
|
|
@ -173,7 +173,7 @@ describe('PostsExporter', function () {
|
|||
|
||||
// Signups
|
||||
assert.equal(posts[0].free_signups, undefined);
|
||||
assert.equal(posts[0].paid_signups, undefined);
|
||||
assert.equal(posts[0].paid_conversions, undefined);
|
||||
});
|
||||
|
||||
it('Hides member related columns if members disabled', async function () {
|
||||
|
@ -192,7 +192,7 @@ describe('PostsExporter', function () {
|
|||
|
||||
// Signups
|
||||
assert.equal(posts[0].free_signups, undefined);
|
||||
assert.equal(posts[0].paid_signups, undefined);
|
||||
assert.equal(posts[0].paid_conversions, undefined);
|
||||
});
|
||||
|
||||
it('Hides clicks if disabled', async function () {
|
||||
|
@ -205,7 +205,7 @@ describe('PostsExporter', function () {
|
|||
assert.notEqual(posts[0].sends, undefined);
|
||||
assert.notEqual(posts[0].opens, undefined);
|
||||
assert.notEqual(posts[0].free_signups, undefined);
|
||||
assert.notEqual(posts[0].paid_signups, undefined);
|
||||
assert.notEqual(posts[0].paid_conversions, undefined);
|
||||
|
||||
assert.equal(posts[0].clicks, undefined);
|
||||
});
|
||||
|
@ -220,7 +220,7 @@ describe('PostsExporter', function () {
|
|||
assert.notEqual(posts[0].sends, undefined);
|
||||
assert.notEqual(posts[0].clicks, undefined);
|
||||
assert.notEqual(posts[0].free_signups, undefined);
|
||||
assert.notEqual(posts[0].paid_signups, undefined);
|
||||
assert.notEqual(posts[0].paid_conversions, undefined);
|
||||
|
||||
assert.equal(posts[0].opens, undefined);
|
||||
});
|
||||
|
@ -237,7 +237,7 @@ describe('PostsExporter', function () {
|
|||
assert.notEqual(posts[0].free_signups, undefined);
|
||||
assert.notEqual(posts[0].opens, undefined);
|
||||
|
||||
assert.equal(posts[0].paid_signups, undefined);
|
||||
assert.equal(posts[0].paid_conversions, undefined);
|
||||
});
|
||||
|
||||
it('Works if relations not loaded correctly', async function () {
|
||||
|
@ -252,7 +252,7 @@ describe('PostsExporter', function () {
|
|||
|
||||
assert.equal(posts[0].clicks, 0);
|
||||
assert.equal(posts[0].free_signups, 0);
|
||||
assert.equal(posts[0].paid_signups, 0);
|
||||
assert.equal(posts[0].paid_conversions, 0);
|
||||
assert.equal(posts[0].reacted_with_more_like_this, 0);
|
||||
assert.equal(posts[0].reacted_with_less_like_this, 0);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue