Skip to content

Commit

Permalink
TDW-2409 added ability to fetch ad_test value from url params
Browse files Browse the repository at this point in the history
  • Loading branch information
bosco-ensemble committed Apr 17, 2024
1 parent 757729b commit 4ca9a48
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions blocks/marketing/marketing.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,21 @@ export default async function decorate(block) {
}
} else {
window.tude.setFeatureFlags({ injectAds: false });
window.tude.refreshAdsViaDivMappings([{
divId: slot,
baseDivId: slot,
}]);
const ad_test = new URLSearchParams(window.location.search).get('ad_test');

Check failure on line 85 in blocks/marketing/marketing.js

View workflow job for this annotation

GitHub Actions / build

Identifier 'ad_test' is not in camel case
if(ad_test) {

Check failure on line 86 in blocks/marketing/marketing.js

View workflow job for this annotation

GitHub Actions / build

Expected space(s) after "if"

Check failure on line 86 in blocks/marketing/marketing.js

View workflow job for this annotation

GitHub Actions / build

Identifier 'ad_test' is not in camel case
window.tude.refreshAdsViaDivMappings([{
divId: slot,
baseDivId: slot,
targeting: {
ad_test: ad_test

Check failure on line 91 in blocks/marketing/marketing.js

View workflow job for this annotation

GitHub Actions / build

Expected property shorthand

Check failure on line 91 in blocks/marketing/marketing.js

View workflow job for this annotation

GitHub Actions / build

Identifier 'ad_test' is not in camel case

Check failure on line 91 in blocks/marketing/marketing.js

View workflow job for this annotation

GitHub Actions / build

Missing trailing comma
}

Check failure on line 92 in blocks/marketing/marketing.js

View workflow job for this annotation

GitHub Actions / build

Missing trailing comma
}]);
} else {
window.tude.refreshAdsViaDivMappings([{
divId: slot,
baseDivId: slot,
}]);
}
}
});
});
Expand Down

0 comments on commit 4ca9a48

Please sign in to comment.