title: contact form 7 google goal tracking not working
body: <p>i had setup google goal tracking with contact form 7 and it was working earliar.but as on ok sent function deprecated i moved it to function file but now its not working and does not shows any goal in list.Here is my function.</p>
  
  <pre><code>add_action( 'wp_footer', 'mycustom_wp_footer' );
  
  
  
      function mycustom_wp_footer() {
  
      ?&gt;
  
      &lt;script type="text/javascript"&gt;
  
      document.addEventListener( 'wpcf7mailsent', function( event ) {
  
          if ( '451' == event.detail.contactFormId ) {
  
              ga( 'send', 'event','CF7 Form','Submission','cfrom1');
  
  
  
          }
  
      }, false );
  
      &lt;/script&gt;
  
      &lt;?php
  
      }
  </code></pre>