Skip to content

Commit

Permalink
issue-28 - add consent manager
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaret committed Jan 24, 2024
1 parent bad8941 commit 5602143
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cigaradvisor/scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,21 @@ import { sampleRUM } from './aem.js';
sampleRUM('cwv');

// add more delayed functionality here

function loadConsentManager() {
window.polarisOptions = {
kingId: "G-XVRFM32Q28",

Check failure on line 11 in cigaradvisor/scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Strings must use singlequote
GoogleAnalyticsTrackingId: "G-XVRFM32Q28",

Check failure on line 12 in cigaradvisor/scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Strings must use singlequote
enableConsentManager: true,
privacyCenterId: "OTNJF7CVF",

Check failure on line 14 in cigaradvisor/scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Strings must use singlequote
};
const script = document.createElement('script');
script.src = 'https://polaris.truevaultcdn.com/static/polaris.js';
script.onload = () => {
// DOMContentLoaded event is required to initialise polaris
window.document.dispatchEvent(new Event("DOMContentLoaded"));

Check failure on line 20 in cigaradvisor/scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Strings must use singlequote
};
document.head.appendChild(script);
}

loadConsentManager();

0 comments on commit 5602143

Please sign in to comment.