@@ -53,6 +53,7 @@ var Amplitude = (module.exports = integration('Amplitude')
5353 . option ( 'unsetParamsReferrerOnNewSession' , false )
5454 . option ( 'trackProductsOnce' , false )
5555 . option ( 'versionName' , '' )
56+ . option ( 'useAmplitudeReferral' , false )
5657 . tag ( '<script src="' + src + '">' ) ) ;
5758
5859/**
@@ -81,6 +82,7 @@ Amplitude.prototype.initialize = function() {
8182 includeGclid : this . options . trackGclid ,
8283 saveParamsReferrerOncePerSession : this . options
8384 . saveParamsReferrerOncePerSession ,
85+ includeReferrer : this . options . useAmplitudeReferral ,
8486 deviceIdFromUrlParam : this . options . deviceIdFromUrlParam ,
8587 unsetParamsReferrerOnNewSession : this . options
8688 . unsetParamsReferrerOnNewSession ,
@@ -144,7 +146,8 @@ Amplitude.prototype.loaded = function() {
144146Amplitude . prototype . page = function ( page ) {
145147 this . setDeviceIdFromAnonymousId ( page ) ;
146148
147- if ( this . options . trackReferrer ) this . sendReferrer ( ) ;
149+ if ( this . options . trackReferrer && ! this . options . useAmplitudeReferral )
150+ this . sendReferrer ( ) ;
148151
149152 var category = page . category ( ) ;
150153 var name = page . fullName ( ) ;
0 commit comments