Suggestion for small tweak to documentation
-
Hi guys, in your documentation you have a page on how to add Google Analytics event tracking to Contact Form 7.
https://contactform7.com/tracking-form-submissions-with-google-analytics/
Specifically you recommend the following code snippet be added to the Additional Settings tab:
on_sent_ok: "ga('send', 'event', 'Contact Form', 'submit');"
I would suggest adding a comment to this page to recommend that people check what their analytics tracking object is actually named, as MonsterInsights (for example) uses __gaTracker() rather than ga(). Additionally many analytics plugins will automatically disable the tracking code when the user is logged in, which causes the contact form to not bring up a confirmation message after sending. As such a better code snippet might be:
on_sent_ok: "if (typeof ga === "function") ga('send', 'event', 'Contact Form', 'submit');"
or, for MonsterInsights:
on_sent_ok: "if (typeof __gaTracker === "function") __gaTracker('send', 'event', 'Contact Form', 'submit');"
- The topic ‘Suggestion for small tweak to documentation’ is closed to new replies.