diff --git a/src/amplitude-client.js b/src/amplitude-client.js index bc92b96c..9527a5a1 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -761,6 +761,7 @@ AmplitudeClient.prototype._initUtmData = function _initUtmData(queryParams, cook AmplitudeClient.prototype._unsetUTMParams = function _unsetUTMParams() { var identify = new Identify(); identify.unset(Constants.REFERRER); + identify.unset(Constants.REFERRING_DOMAIN); identify.unset(Constants.UTM_SOURCE); identify.unset(Constants.UTM_MEDIUM); identify.unset(Constants.UTM_CAMPAIGN); diff --git a/src/constants.js b/src/constants.js index 59267f29..6e2a5052 100644 --- a/src/constants.js +++ b/src/constants.js @@ -53,6 +53,7 @@ export default { AMP_REFERRER_PARAM: 'amp_referrer', // url param for overwriting the document.refer REFERRER: 'referrer', + REFERRING_DOMAIN: 'referring_domain', // UTM Params UTM_SOURCE: 'utm_source', diff --git a/test/amplitude-client.js b/test/amplitude-client.js index 1803b6cb..4d624f56 100644 --- a/test/amplitude-client.js +++ b/test/amplitude-client.js @@ -3394,6 +3394,7 @@ describe('AmplitudeClient', function () { { $unset: { referrer: '-', + referring_domain: '-', utm_source: '-', utm_medium: '-', utm_campaign: '-', @@ -3483,6 +3484,7 @@ describe('AmplitudeClient', function () { { $unset: { referrer: '-', + referring_domain: '-', utm_source: '-', utm_medium: '-', utm_campaign: '-',