Skip to content

Commit

Permalink
chore(build): Generate latest bundle [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mparticle-automation committed Nov 11, 2021
1 parent af01adc commit f98f394
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 32 deletions.
34 changes: 18 additions & 16 deletions dist/GoogleAdWordsEventForwarder.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
var conversionLabel = getConversionLabel(event);
var customProps = getCustomProps(event);

// Determines the proper event to fire
if (event.EventDataType == MessageType.PageView || event.EventDataType == MessageType.PageEvent) {
eventPayload = generateEventFunction(event, conversionLabel, customProps);
} else if (event.EventDataType == MessageType.Commerce && event.ProductAction) {
eventPayload = generateCommerceEvent(event, conversionLabel, customProps);
}

if (eventPayload) {
reportEvent = sendEventFunction(eventPayload);
}

if (reportEvent && reportingService) {
reportingService(self, event);

return 'Successfully sent to ' + name;
if (conversionLabel) {
// Determines the proper event to fire
if (event.EventDataType == MessageType.PageView || event.EventDataType == MessageType.PageEvent) {
eventPayload = generateEventFunction(event, conversionLabel, customProps);
} else if (event.EventDataType == MessageType.Commerce && event.ProductAction) {
eventPayload = generateCommerceEvent(event, conversionLabel, customProps);
}

if (eventPayload) {
reportEvent = sendEventFunction(eventPayload);
}

if (reportEvent && reportingService) {
reportingService(self, event);

return 'Successfully sent to ' + name;
}
}

return 'Can\'t send to forwarder: ' + name + '. Event not mapped';
Expand Down Expand Up @@ -177,7 +179,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
// gtag Events
function getBaseGtagEvent(conversionLabel) {
return {
'send-to': gtagSiteId + '/' + conversionLabel,
'send_to': gtagSiteId + '/' + conversionLabel,
'value': 0,
'language': 'en',
'remarketing_only': forwarderSettings.remarketingOnly == 'True'
Expand Down
34 changes: 18 additions & 16 deletions dist/GoogleAdWordsEventForwarder.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,23 @@ var mpAdWordsKit = (function (exports) {
var conversionLabel = getConversionLabel(event);
var customProps = getCustomProps(event);

// Determines the proper event to fire
if (event.EventDataType == MessageType.PageView || event.EventDataType == MessageType.PageEvent) {
eventPayload = generateEventFunction(event, conversionLabel, customProps);
} else if (event.EventDataType == MessageType.Commerce && event.ProductAction) {
eventPayload = generateCommerceEvent(event, conversionLabel, customProps);
}

if (eventPayload) {
reportEvent = sendEventFunction(eventPayload);
}

if (reportEvent && reportingService) {
reportingService(self, event);

return 'Successfully sent to ' + name;
if (conversionLabel) {
// Determines the proper event to fire
if (event.EventDataType == MessageType.PageView || event.EventDataType == MessageType.PageEvent) {
eventPayload = generateEventFunction(event, conversionLabel, customProps);
} else if (event.EventDataType == MessageType.Commerce && event.ProductAction) {
eventPayload = generateCommerceEvent(event, conversionLabel, customProps);
}

if (eventPayload) {
reportEvent = sendEventFunction(eventPayload);
}

if (reportEvent && reportingService) {
reportingService(self, event);

return 'Successfully sent to ' + name;
}
}

return 'Can\'t send to forwarder: ' + name + '. Event not mapped';
Expand Down Expand Up @@ -176,7 +178,7 @@ var mpAdWordsKit = (function (exports) {
// gtag Events
function getBaseGtagEvent(conversionLabel) {
return {
'send-to': gtagSiteId + '/' + conversionLabel,
'send_to': gtagSiteId + '/' + conversionLabel,
'value': 0,
'language': 'en',
'remarketing_only': forwarderSettings.remarketingOnly == 'True'
Expand Down

0 comments on commit f98f394

Please sign in to comment.