• Resolved ventio

    (@ventio)


    Your plugin is really great but I have one problem with it, because it sent an event to analytics (SENT) even if the mail is not sent properly.
    What can cause my problem?
    What to look for?
    I use the “Google Analytics for WordPress by MonsterInsights” plugin – can it affect in this way?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author macbookandrew

    (@macbookandrew)

    Hi @ventio,

    Thanks. This plugin operates completely on the frontend, so it only knows what Contact Form 7 tells it about the email being sent. The main purpose is to track form submissions, and it relies on the “on_sent_ok” message from CF7.

    Whether mail is actually delivered or not is a completely separate issue, and this plugin doesn’t touch that at all.

    That said, here are a couple of suggestions you could try:

    • Add your server’s IP address to your domain’s SPF record so it is trusted as a sender for your domain
    • Try a SMTP plugin that uses external SMTP servers to send email instead of sending directly from the server
    • Try a mail delivery service (Mailgun, etc.)
    • Double-check that nothing in the email content might be flagged as spam

    Hope that helps!

    Thread Starter ventio

    (@ventio)

    unfortunately, I think we didn’t understand each other well. The point is that plugin sends the event to Analytics even if the form is not completed correctly (eg. the email address is missing), it is enough that someone clicks “send”.
    Concluding: CF7 could not send a message, but the event is still being tracked in analytics. I want to eliminate it and track only those events in which the form was actually sent

    Plugin Author macbookandrew

    (@macbookandrew)

    Ah, I see what you mean. As long as a form is submitted correctly, this plugin will send an event to Google Analytics.

    To solve the specific problem you mentioned, try adding the “required” parameter to your email fields (that should handle all modern browsers…IE 9 would be the exception).

    Thread Starter ventio

    (@ventio)

    Email field is already required, you can check it here:
    https://marka.plus/smycze-reklamowe/
    Problem is that plugin send event to GA even if form is not submitted correctly.

    Plugin Author macbookandrew

    (@macbookandrew)

    Sorry, my mistake. I see what you mean: it’s sending a “Sent” event even if the form is invalid.

    Please disable the plugin and install and activate this dev version: https://github.com/macbookandrew/cf7-google-analytics/archive/dev1.7.0.zip

    It will send events for all available CF7 events as described here: https://github.com/macbookandrew/cf7-google-analytics#what-events-will-be-shown

    Please let me know how it goes.

    Thread Starter ventio

    (@ventio)

    Thank you for your support ! Now it work perfectly with this version of plugin.

    Plugin Author macbookandrew

    (@macbookandrew)

    Glad to hear it. Thanks!

    Isn’t the on sent ok being abolished by CF7?

    on_sent_ok and on_submit have been officially removed from Contact Form 7 5.0.

    Source: https://contactform7.com/2017/06/07/on-sent-ok-is-deprecated/

    Plugin Author macbookandrew

    (@macbookandrew)

    @jochemvrowl,

    Yes, you are correct. My mistake above…the plugin used to rely on on_sent_ok (and still does if the CF7 plugin version is 4.7 or below); for CF7 versions 4.8 and above, it uses the DOM events as described here: https://contactform7.com/dom-events/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Even analytics if the mail is not sent properly’ is closed to new replies.