Skip to content

Commit 10285c1

Browse files
author
ghost
committed
log
1 parent 4787247 commit 10285c1

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

thank-you.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,22 @@
8787

8888

8989
<script>
90-
if (window.mousaCookieConsent && window.mousaCookieConsent.get) {
90+
(function () {
91+
if (!window.mousaCookieConsent || !window.mousaCookieConsent.get) return;
92+
9193
const consent = window.mousaCookieConsent.get();
94+
if (!consent || consent.accepted !== true) return;
95+
96+
setTimeout(function () {
97+
if (typeof window.gtag !== 'function') return;
9298

93-
if (consent && consent.accepted === true && typeof window.gtag === 'function') {
9499
window.gtag('event', 'conversion', {
95-
send_to: 'AW-18022556253/REPLACE_WITH_YOUR_LABEL'
100+
send_to: 'AW-18022556253/REPLACE_WITH_REAL_LABEL'
96101
});
97-
console.log('conversion event fired');
98-
}
99-
}
102+
103+
console.log('Google Ads conversion sent');
104+
}, 1000);
105+
})();
100106
</script>
101107

102108

0 commit comments

Comments
 (0)