adwords tracking
-
I’m tracking conversion through additional settings:
on_sent_ok: "typeof goog_report_conversion === 'function' && goog_report_conversion();"
But this will be deprecated.
Can I do it like this instead?:
document.addEventListener( 'wpcf7submit', function( event ) { typeof goog_report_conversion === 'function' && goog_report_conversion(); }, false );
or should I do like this?
document.addEventListener( 'wpcf7mailsent', function( event ) { ga( 'send', 'event', 'Contact Form', 'submit' ); }, false );
The tracking code in formular is:
<!-- Google Code for Send Besked Conversion Page In your html page, add the snippet and call goog_report_conversion when someone clicks on the chosen link or button. --> <script type="text/javascript"> /* <![CDATA[ */ goog_snippet_vars = function() { var w = window; w.google_conversion_id = XXXXXXXXX; w.google_conversion_label = "yNqsCPS44FcQt6XxzAM"; w.google_remarketing_only = false; } // DO NOT CHANGE THE CODE BELOW. goog_report_conversion = function(url) { goog_snippet_vars(); window.google_conversion_format = "3"; var opt = new Object(); opt.onload_callback = function() { if (typeof(url) != 'undefined') { window.location = url; } } var conv_handler = window['google_trackConversion']; if (typeof(conv_handler) == 'function') { conv_handler(opt); } } /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion_async.js"> </script>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘adwords tracking’ is closed to new replies.