Skip to content

Commit

Permalink
added version name
Browse files Browse the repository at this point in the history
  • Loading branch information
prabrishac committed Nov 23, 2020
1 parent 6dd26e7 commit 4db0e25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions integrations/Amplitude/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { type } from "../../utils/utils"

class Amplitude {
constructor(config, analytics) {

this.analytics = analytics;
this.apiKey = config.apiKey;
this.trackAllPages = config.trackAllPages || false;
Expand All @@ -26,7 +27,7 @@ class Amplitude {
this.appendFieldsToEventProps = config.appendFieldsToEventProps || false;
this.unsetParamsReferrerOnNewSession = config.unsetParamsReferrerOnNewSession || false;
this.trackProductsOnce = config.trackProductsOnce || false;
//this.versionName = config.versionName;
this.versionName = config.versionName;

if(config.traitsToSetOnce && config.traitsToSetOnce.length > 0){
config.traitsToSetOnce.forEach(element => {
Expand Down Expand Up @@ -129,9 +130,9 @@ class Amplitude {
deviceId: this.preferAnonymousIdForDeviceId && this.analytics && this.analytics.getAnonymousId()
}
window.amplitude.getInstance().init(this.apiKey, null, initOptions);
/* if (this.versionName) {
if (this.versionName) {
window.amplitude.getInstance().setVersionName(this.versionName);
} */
}
}

identify(rudderElement) {
Expand Down

0 comments on commit 4db0e25

Please sign in to comment.