creativekindle
Forum Replies Created
-
If I deactivate the other plugin, and run a backup, UpdraftPlus will run/function as expected. UpdraftPlus cannot complete the backup if the other plugin is activated – as it looks like UpdraftPlus uses an older version of AWS SDK, whereas, the other plugin uses the latest version.
The other plugin works as expected whether or not UpdraftPlus is activated/deactivated.
Yes, version 1.16.6.
The sticky post states I can only post on updraftplus.com if I have the paid version. My issue is regarding the free version.
Forum: Plugins
In reply to: [Contact Form 7] Event Tracking in Google Analytics@gracy834
I got it. But I ran into a few more issues I wanted to recap in case someone else has a similar issue. So if I just use the script/code as is:
var wpcf7Elm = document.querySelector( '.wpcf7' ); wpcf7Elm.addEventListener( 'wpcf7mailsent', function( event ) { dataLayer.push({'event' : 'Form Submitted'}); }, false );
…I get a “Uncaught TypeError: Cannot read property ‘addEventListener’ of null”.
And if I check it exists with an IF first…
var wpcf7Elm = document.querySelector( '.wpcf7' ); if(wpcf7Elm){ wpcf7Elm.addEventListener( 'wpcf7mailsent', function( event ) { dataLayer.push({'event' : 'Form Submitted'}); }, false ); }
I squash that null error, but the dataLayer push isn’t firing.
So I went back to document…
document.addEventListener( 'wpcf7mailsent', function( event ) { dataLayer.push({'event' : 'Form Submitted'}); }, false );
And that fired my GTM trigger. There’s a bit of a delay (maybe 3 minutes), but GA did finally register the event on today.
Forum: Plugins
In reply to: [Contact Form 7] wpcf7mailsent Not Firing; addEventListener Not WorkingForum: Plugins
In reply to: [Contact Form 7] Event Tracking in Google AnalyticsSo the culprit appears to have been a plugin called “Insert or Embed iSpring Content into WordPress”. The client has a ton of plugins, so I had to go one by one. I now I have the following code within Additional Settings of the specific form in CF7:
on_sent_ok: "dataLayer.push({'event': 'Form Submitted'});"
In GTM I have my tag/trigger set up to capture the page URL on form submit. And in GA I have a Goal set up to track the event.
Now that I know THIS is working, I should be able to get rid of the specific form Additional Settings line:
on_sent_ok: "dataLayer.push({'event': 'Form Submitted'});"
…and place the following code in my header.php file, correct?
<script> var wpcf7Elm = document.querySelector( '.wpcf7' ); wpcf7Elm.addEventListener( 'wpcf7mailsent', function( event ) { dataLayer.push({'event' : 'Form Submitted'}); }, false ); </script>
Forum: Plugins
In reply to: [Contact Form 7] Event Tracking in Google AnalyticsOK, I just ran through and set up another site and it works! So my issue must be some conflicting code/plugins on this other client’s site. Thanks for your help.
Forum: Plugins
In reply to: [Contact Form 7] Event Tracking in Google Analytics@gravy834, yes.
I have a bunch of client sites, so I’m going to do a quick test on another site to see if I come up with the same issue. I’ll be in touch shortly.
Forum: Plugins
In reply to: [Contact Form 7] Event Tracking in Google AnalyticsThanks, @gravy834.
I’m on 4.7. My issue seems to me something earlier on in the chain. I can’t even get…
var wpcf7Elm = document.querySelector( '.wpcf7' );
…to fire even if it’s directly on the page (taking GTM out of the equation) which is making me think there’s a conflicting issue.
Forum: Plugins
In reply to: [Contact Form 7] Event Tracking in Google AnalyticsI too have been working with GTM to no avail. So you’re saying you used just added a variable for the “wpcf7” (the default form class) and attached it to the listener, and voila? By any chance were you following the tutorial on YouTube, “How to Setup Event Tracking for Contact Form 7 via Google Tag Manager”?