@@ -53,6 +53,7 @@ var Amplitude = (module.exports = integration('Amplitude')
53
53
. option ( 'unsetParamsReferrerOnNewSession' , false )
54
54
. option ( 'trackProductsOnce' , false )
55
55
. option ( 'versionName' , '' )
56
+ . option ( 'useAmplitudeReferral' , false )
56
57
. tag ( '<script src="' + src + '">' ) ) ;
57
58
58
59
/**
@@ -81,6 +82,7 @@ Amplitude.prototype.initialize = function() {
81
82
includeGclid : this . options . trackGclid ,
82
83
saveParamsReferrerOncePerSession : this . options
83
84
. saveParamsReferrerOncePerSession ,
85
+ includeReferrer : this . options . useAmplitudeReferral ,
84
86
deviceIdFromUrlParam : this . options . deviceIdFromUrlParam ,
85
87
unsetParamsReferrerOnNewSession : this . options
86
88
. unsetParamsReferrerOnNewSession ,
@@ -144,7 +146,8 @@ Amplitude.prototype.loaded = function() {
144
146
Amplitude . prototype . page = function ( page ) {
145
147
this . setDeviceIdFromAnonymousId ( page ) ;
146
148
147
- if ( this . options . trackReferrer ) this . sendReferrer ( ) ;
149
+ if ( this . options . trackReferrer && ! this . options . useAmplitudeReferral )
150
+ this . sendReferrer ( ) ;
148
151
149
152
var category = page . category ( ) ;
150
153
var name = page . fullName ( ) ;
0 commit comments