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