Skip to content

Commit

Permalink
update dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan-rudder committed May 19, 2020
1 parent 3ff4eed commit 99c7069
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 19 deletions.
27 changes: 18 additions & 9 deletions dist/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ var rudderanalytics = (function (exports) {
}
}

//Message Type enumeration
var version = "1.1.1";

var MessageType = {
TRACK: "track",
PAGE: "page",
Expand Down Expand Up @@ -554,7 +555,7 @@ var rudderanalytics = (function (exports) {
}; //Enumeration for integrations supported
var BASE_URL = "https://hosted-dataplane.rudderstack.com"; // default to RudderStack

var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig"; //"https://api.rudderlabs.com/workspaceConfig";
var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=web&v=" + version; //"https://api.rudderlabs.com/workspaceConfig";
var MAX_WAIT_FOR_INTEGRATION_LOAD = 10000;
var INTEGRATION_LOAD_CHECK_INTERVAL = 1000;
/* module.exports = {
Expand Down Expand Up @@ -4176,6 +4177,7 @@ var rudderanalytics = (function (exports) {
this.conversionId = config.conversionID;
this.pageLoadConversions = config.pageLoadConversions;
this.clickEventConversions = config.clickEventConversions;
this.defaultPageConversion = config.defaultPageConversion;
this.name = "GOOGLEADS";
}

Expand Down Expand Up @@ -4254,14 +4256,21 @@ var rudderanalytics = (function (exports) {
var conversionData = {};

if (eventTypeConversions) {
eventTypeConversions.forEach(function (eventTypeConversion) {
if (eventTypeConversion.name.toLowerCase() === eventName.toLowerCase()) {
//rudderElement["message"]["name"]
conversionData["conversionLabel"] = eventTypeConversion.conversionLabel;
conversionData["eventName"] = eventTypeConversion.name;
return;
if (eventName) {
eventTypeConversions.forEach(function (eventTypeConversion) {
if (eventTypeConversion.name.toLowerCase() === eventName.toLowerCase()) {
//rudderElement["message"]["name"]
conversionData["conversionLabel"] = eventTypeConversion.conversionLabel;
conversionData["eventName"] = eventTypeConversion.name;
return;
}
});
} else {
if (this.defaultPageConversion) {
conversionData["conversionLabel"] = this.defaultPageConversion;
conversionData["eventName"] = "Viewed a Page";
}
});
}
}

return conversionData;
Expand Down
Binary file modified dist/rudder-analytics.min.br.js.br
Binary file not shown.
Binary file modified dist/rudder-analytics.min.gzip.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/rudder-analytics.min.js

Large diffs are not rendered by default.

27 changes: 18 additions & 9 deletions tests/html/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ var rudderanalytics = (function (exports) {
}
}

//Message Type enumeration
var version = "1.1.1";

var MessageType = {
TRACK: "track",
PAGE: "page",
Expand Down Expand Up @@ -554,7 +555,7 @@ var rudderanalytics = (function (exports) {
}; //Enumeration for integrations supported
var BASE_URL = "https://hosted-dataplane.rudderstack.com"; // default to RudderStack

var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig"; //"https://api.rudderlabs.com/workspaceConfig";
var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=web&v=" + version; //"https://api.rudderlabs.com/workspaceConfig";
var MAX_WAIT_FOR_INTEGRATION_LOAD = 10000;
var INTEGRATION_LOAD_CHECK_INTERVAL = 1000;
/* module.exports = {
Expand Down Expand Up @@ -4176,6 +4177,7 @@ var rudderanalytics = (function (exports) {
this.conversionId = config.conversionID;
this.pageLoadConversions = config.pageLoadConversions;
this.clickEventConversions = config.clickEventConversions;
this.defaultPageConversion = config.defaultPageConversion;
this.name = "GOOGLEADS";
}

Expand Down Expand Up @@ -4254,14 +4256,21 @@ var rudderanalytics = (function (exports) {
var conversionData = {};

if (eventTypeConversions) {
eventTypeConversions.forEach(function (eventTypeConversion) {
if (eventTypeConversion.name.toLowerCase() === eventName.toLowerCase()) {
//rudderElement["message"]["name"]
conversionData["conversionLabel"] = eventTypeConversion.conversionLabel;
conversionData["eventName"] = eventTypeConversion.name;
return;
if (eventName) {
eventTypeConversions.forEach(function (eventTypeConversion) {
if (eventTypeConversion.name.toLowerCase() === eventName.toLowerCase()) {
//rudderElement["message"]["name"]
conversionData["conversionLabel"] = eventTypeConversion.conversionLabel;
conversionData["eventName"] = eventTypeConversion.name;
return;
}
});
} else {
if (this.defaultPageConversion) {
conversionData["conversionLabel"] = this.defaultPageConversion;
conversionData["eventName"] = "Viewed a Page";
}
});
}
}

return conversionData;
Expand Down

0 comments on commit 99c7069

Please sign in to comment.