mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added new setting to toggle tracking of member sources (#15705)
refs https://github.com/TryGhost/Team/issues/2168 - the new setting allows site owners to control if they want to track the sources for new member signups and subscriptions - its switched on by default, but can be toggled off from new analytics settings page
This commit is contained in:
parent
da559e5a7f
commit
cca0f7d7dc
5 changed files with 19 additions and 2 deletions
|
@ -48,6 +48,7 @@ const EDITABLE_SETTINGS = [
|
||||||
'mailgun_base_url',
|
'mailgun_base_url',
|
||||||
'email_track_opens',
|
'email_track_opens',
|
||||||
'email_track_clicks',
|
'email_track_clicks',
|
||||||
|
'members_track_sources',
|
||||||
'amp',
|
'amp',
|
||||||
'amp_gtag_id',
|
'amp_gtag_id',
|
||||||
'slack_url',
|
'slack_url',
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
const {addSetting} = require('../../utils');
|
||||||
|
|
||||||
|
module.exports = addSetting({
|
||||||
|
key: 'members_track_sources',
|
||||||
|
value: 'true',
|
||||||
|
type: 'boolean',
|
||||||
|
group: 'members'
|
||||||
|
});
|
|
@ -295,6 +295,14 @@
|
||||||
"members_yearly_price_id": {
|
"members_yearly_price_id": {
|
||||||
"defaultValue": null,
|
"defaultValue": null,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"members_track_sources": {
|
||||||
|
"defaultValue": "true",
|
||||||
|
"validations": {
|
||||||
|
"isEmpty": false,
|
||||||
|
"isIn": [["true", "false"]]
|
||||||
|
},
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"portal": {
|
"portal": {
|
||||||
|
|
|
@ -234,7 +234,7 @@ describe('Exporter', function () {
|
||||||
|
|
||||||
// NOTE: if default settings changed either modify the settings keys blocklist or increase allowedKeysLength
|
// NOTE: if default settings changed either modify the settings keys blocklist or increase allowedKeysLength
|
||||||
// This is a reminder to think about the importer/exporter scenarios ;)
|
// This is a reminder to think about the importer/exporter scenarios ;)
|
||||||
const allowedKeysLength = 71;
|
const allowedKeysLength = 72;
|
||||||
totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength);
|
totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('DB version integrity', function () {
|
||||||
// Only these variables should need updating
|
// Only these variables should need updating
|
||||||
const currentSchemaHash = 'bb48c3c754f74f02a6ce020af6b0e6a7';
|
const currentSchemaHash = 'bb48c3c754f74f02a6ce020af6b0e6a7';
|
||||||
const currentFixturesHash = 'dcb7ba7c66b4b98d6c26a722985e756a';
|
const currentFixturesHash = 'dcb7ba7c66b4b98d6c26a722985e756a';
|
||||||
const currentSettingsHash = '2978a5684a2d5fcf089f61f5d368a0c0';
|
const currentSettingsHash = 'aa0014a3b9fd9e69a1402fb1b5d4210b';
|
||||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||||
|
|
||||||
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
||||||
|
|
Loading…
Add table
Reference in a new issue