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 26, 2024
1 parent 83ff510 commit 83c03c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 1 addition & 11 deletions src/BingAdsEventForwarder.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ var constructor = function() {
self.consentMappings
);

var consentPayload;
if (!isEmpty(initialConsentPayload)) {
consentPayload = initialConsentPayload;
} else if (!isEmpty(updatedConsentPayload)) {
consentPayload = updatedConsentPayload;
}

try {
if (!testMode) {
(function(window, document, tag, url, queue) {
Expand All @@ -79,7 +72,7 @@ var constructor = function() {
var i;
(window[queue] = window[queue] || []),
(window.uetq = window.uetq || []),
sendConsentDefaultToBing(consentPayload),
sendConsentDefaultToBing(initialConsentPayload),
(f = function() {
var obj = {
ti: forwarderSettings.tagId,
Expand Down Expand Up @@ -254,9 +247,6 @@ var constructor = function() {
}

function maybeSendConsentUpdateToBing(consentState) {
// If consent payload is empty,
// we never sent an initial default consent state
// so we shouldn't send an update.
if (
self.consentPayloadAsString &&
self.consentMappings &&
Expand Down
2 changes: 0 additions & 2 deletions test/src/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,6 @@ describe('Bing Ads Event Forwarder', function() {
{ ad_storage: 'granted' },
];

console.log('uetq', window.uetq);

window.uetq.length.should.eql(3);
window.uetq[0].should.equal('consent');
window.uetq[1].should.equal('default');
Expand Down

0 comments on commit 83c03c9

Please sign in to comment.