Skip to content

Commit 6486f02

Browse files
author
ghost
committed
log
1 parent 10285c1 commit 6486f02

1 file changed

Lines changed: 20 additions & 10 deletions

File tree

thank-you.html

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,31 @@
8888

8989
<script>
9090
(function () {
91-
if (!window.mousaCookieConsent || !window.mousaCookieConsent.get) return;
9291

93-
const consent = window.mousaCookieConsent.get();
94-
if (!consent || consent.accepted !== true) return;
92+
try {
9593

96-
setTimeout(function () {
97-
if (typeof window.gtag !== 'function') return;
94+
if (!window.mousaCookieConsent || !window.mousaCookieConsent.get) return;
9895

99-
window.gtag('event', 'conversion', {
100-
send_to: 'AW-18022556253/REPLACE_WITH_REAL_LABEL'
101-
});
96+
const consent = window.mousaCookieConsent.get();
97+
if (!consent || consent.accepted !== true) return;
98+
99+
setTimeout(function () {
100+
if (typeof window.gtag !== 'function') return;
101+
102+
window.gtag('event', 'conversion', {
103+
send_to: 'AW-18022556253/REPLACE_WITH_REAL_LABEL'
104+
});
105+
106+
console.log('Google Ads conversion sent');
107+
}, 1000);
108+
109+
} catch {
110+
console.log(e);
111+
}
102112

103-
console.log('Google Ads conversion sent');
104-
}, 1000);
105113
})();
114+
115+
106116
</script>
107117

108118

0 commit comments

Comments
 (0)