Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

DOM Redirect and Analytics Events Not Working

$
0
0

Replies: 0

I’ve used this code on dozens of sites and it has always worked. This week I tried each on two different sites and they are doing nothing.

Have these stopped working?

<script>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
location = ‘http://example.com/’;
}, false );
</script>

https://contactform7.com/redirecting-to-another-url-after-submissions/

<script>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
ga(‘send’, ‘event’, ‘Contact Form’, ‘submit’);
}, false );
</script>

https://contactform7.com/tracking-form-submissions-with-google-analytics/


Viewing all articles
Browse latest Browse all 59525

Trending Articles