Skip to content

Commit

Permalink
Address PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexs-mparticle committed Sep 25, 2024
1 parent 5605bf3 commit c50b73c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
9 changes: 3 additions & 6 deletions src/BingAdsEventForwarder.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ var constructor = function() {
self.name = name;

function initForwarder(settings, service, testMode) {
console.warn('BING Local DEV');

forwarderSettings = settings;
reportingService = service;

if (forwarderSettings.consentMapingWeb) {
if (forwarderSettings.consentMappingWeb) {
self.consentMappings = parseSettingsString(
forwarderSettings.consentMapingWeb
forwarderSettings.consentMappingWeb
);
}
self.consentPayloadDefaults = getConsentSettings(forwarderSettings);
Expand Down Expand Up @@ -89,7 +87,7 @@ var constructor = function() {
};
(obj.q = window[queue]),
(window[queue] = new UET(obj)),
maybeSendConsentUpdateToBing(consentPayload);
maybeSendConsentUpdateToBing(updatedConsentPayload);

Check failure on line 90 in src/BingAdsEventForwarder.js

View workflow job for this annotation

GitHub Actions / Run Web Kit PR Workflow / Build and Test

Replace `updatedConsentPayload` with `⏎····································updatedConsentPayload⏎································`
window[queue].push('pageLoad');
}),
(n = document.createElement(tag)),
Expand Down Expand Up @@ -122,7 +120,6 @@ var constructor = function() {
isInitialized = true;
return 'Successfully initialized: ' + name;
} catch (e) {
console.log('error?');
return "Can't initialize forwarder: " + name + ': ' + e;
}
}
Expand Down
12 changes: 6 additions & 6 deletions test/src/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ describe('Bing Ads Event Forwarder', function() {
mParticle.forwarder.init(
{
tagId: 'tagId',
consentMapingWeb:
consentMappingWeb:
'[{"jsmap":null,"map":"Marketing","maptype":"ConsentPurposes","value":"ad_storage"}]',
},
reportService.cb,
Expand Down Expand Up @@ -283,7 +283,7 @@ describe('Bing Ads Event Forwarder', function() {
mParticle.forwarder.init(
{
tagId: 'tagId',
consentMapingWeb: JSON.stringify(consentMap),
consentMappingWeb: JSON.stringify(consentMap),
defaultAdStorageConsentWeb: 'Denied', // Should be overridden by user consent state
},
reportService.cb,
Expand Down Expand Up @@ -357,7 +357,7 @@ describe('Bing Ads Event Forwarder', function() {
mParticle.forwarder.init(
{
tagId: 'tagId',
consentMapingWeb: JSON.stringify(consentMap),
consentMappingWeb: JSON.stringify(consentMap),
defaultAdStorageConsentWeb: 'Unspecified', // Should be overridden by user consent state
},
reportService.cb,
Expand All @@ -383,7 +383,7 @@ describe('Bing Ads Event Forwarder', function() {
mParticle.forwarder.init(
{
tagId: 'tagId',
consentMapingWeb: JSON.stringify(consentMap),
consentMappingWeb: JSON.stringify(consentMap),
},
reportService.cb,
false // Disable testMode so we can test init
Expand Down Expand Up @@ -459,7 +459,7 @@ describe('Bing Ads Event Forwarder', function() {
mParticle.forwarder.init(
{
tagId: 'tagId',
consentMapingWeb: JSON.stringify(consentMap),
consentMappingWeb: JSON.stringify(consentMap),
defaultAdStorageConsentWeb: 'Denied',
},
reportService.cb,
Expand Down Expand Up @@ -536,7 +536,7 @@ describe('Bing Ads Event Forwarder', function() {
mParticle.forwarder.init(
{
tagId: 'tagId',
consentMapingWeb: JSON.stringify(consentMap),
consentMappingWeb: JSON.stringify(consentMap),
},
reportService.cb,
false // Disable testMode so we can test init
Expand Down

0 comments on commit c50b73c

Please sign in to comment.