EduardET

correct Js code

Nov 13th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. (function($) {
  3.     $(document).ready(function() {
  4.         function gtag_report_conversion(url) {
  5.             var callback = function () {
  6.                 if (typeof(url) != 'undefined') {
  7.                     window.location = url;
  8.                 }
  9.             };
  10.             gtag('event', 'conversion', {
  11.                 'send_to': 'AW-840283043/8KgICOb2t3cQo-fWkAM',
  12.                 'event_callback': callback
  13.             });
  14.             return false;
  15.         }
  16.         $( ".et_pb_contact_form_0 .et_pb_contact_submit" ).click(function() {
  17.             gtag_report_conversion();
  18.         });
  19.     });
  20. })(jQuery);
  21. </script>
Advertisement
Add Comment
Please, Sign In to add comment