Skip to content

Commit

Permalink
fix: reset referring_domain
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercy811 authored Mar 22, 2023
1 parent d7e7cf2 commit eaa7446
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/amplitude-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions test/amplitude-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3394,6 +3394,7 @@ describe('AmplitudeClient', function () {
{
$unset: {
referrer: '-',
referring_domain: '-',
utm_source: '-',
utm_medium: '-',
utm_campaign: '-',
Expand Down Expand Up @@ -3483,6 +3484,7 @@ describe('AmplitudeClient', function () {
{
$unset: {
referrer: '-',
referring_domain: '-',
utm_source: '-',
utm_medium: '-',
utm_campaign: '-',
Expand Down

0 comments on commit eaa7446

Please sign in to comment.