Skip to content

Commit eaa7446

Browse files
authored
fix: reset referring_domain
1 parent d7e7cf2 commit eaa7446

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/amplitude-client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ AmplitudeClient.prototype._initUtmData = function _initUtmData(queryParams, cook
761761
AmplitudeClient.prototype._unsetUTMParams = function _unsetUTMParams() {
762762
var identify = new Identify();
763763
identify.unset(Constants.REFERRER);
764+
identify.unset(Constants.REFERRING_DOMAIN);
764765
identify.unset(Constants.UTM_SOURCE);
765766
identify.unset(Constants.UTM_MEDIUM);
766767
identify.unset(Constants.UTM_CAMPAIGN);

src/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default {
5353
AMP_REFERRER_PARAM: 'amp_referrer', // url param for overwriting the document.refer
5454

5555
REFERRER: 'referrer',
56+
REFERRING_DOMAIN: 'referring_domain',
5657

5758
// UTM Params
5859
UTM_SOURCE: 'utm_source',

test/amplitude-client.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3394,6 +3394,7 @@ describe('AmplitudeClient', function () {
33943394
{
33953395
$unset: {
33963396
referrer: '-',
3397+
referring_domain: '-',
33973398
utm_source: '-',
33983399
utm_medium: '-',
33993400
utm_campaign: '-',
@@ -3483,6 +3484,7 @@ describe('AmplitudeClient', function () {
34833484
{
34843485
$unset: {
34853486
referrer: '-',
3487+
referring_domain: '-',
34863488
utm_source: '-',
34873489
utm_medium: '-',
34883490
utm_campaign: '-',

0 commit comments

Comments
 (0)