Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion integrations/amplitude/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var Amplitude = (module.exports = integration('Amplitude')
.option('unsetParamsReferrerOnNewSession', false)
.option('trackProductsOnce', false)
.option('versionName', '')
.option('useAmplitudeReferral', false)
.tag('<script src="' + src + '">'));

/**
Expand Down Expand Up @@ -81,6 +82,7 @@ Amplitude.prototype.initialize = function() {
includeGclid: this.options.trackGclid,
saveParamsReferrerOncePerSession: this.options
.saveParamsReferrerOncePerSession,
includeReferrer: this.options.useAmplitudeReferral,
deviceIdFromUrlParam: this.options.deviceIdFromUrlParam,
unsetParamsReferrerOnNewSession: this.options
.unsetParamsReferrerOnNewSession,
Expand Down Expand Up @@ -144,7 +146,8 @@ Amplitude.prototype.loaded = function() {
Amplitude.prototype.page = function(page) {
this.setDeviceIdFromAnonymousId(page);

if (this.options.trackReferrer) this.sendReferrer();
if (this.options.trackReferrer && !this.options.useAmplitudeReferral)
this.sendReferrer();

var category = page.category();
var name = page.fullName();
Expand Down
2 changes: 1 addition & 1 deletion integrations/amplitude/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@segment/analytics.js-integration-amplitude",
"description": "The Amplitude analytics.js integration.",
"version": "3.3.2",
"version": "3.3.3",
"keywords": [
"analytics.js",
"analytics.js-integration",
Expand Down