File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments