• Resolved hfreijanes

    (@misteriobrewing)


    I’m trying to track form submissions using Google Tag Manager but I ran into some issues. I hope you can help me figure this out.

    Every time the Send button is clicked, a “Form Submission” event is triggered twice in Tag Assistant, but I don’t want Google Ads to count these as two conversions. The only value I found that changes between these two events is a boolean called “gtm.formCanceled”. I set the GTM trigger to only be activated if “gtm.formCanceled” equals false. But I’m not sure if this is a good approach to solve the problem and if I’m losing some form submissions this way.

    On top of that I could not figure out a way not to track failed form submissions. If a potential client forgets to fill in one required field and gets an error message the form is not sent but the GTM tag is triggered anyway. After fixing the missing field and clicking the Send button again the conversion will be tracked again and count as two, which will mess up the stats in Google Ads.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Njones35

    (@njones35)

    Hello,

    Thank you for reaching out with your concerns regarding tracking form submissions with Google Tag Manager.

    To address the issue of the “Form Submission” event triggering twice, your approach using the “gtm.formCanceled” variable to filter out duplicate events is a reasonable solution. This should help ensure that only successful submissions are counted as conversions.

    Regarding the tracking of failed form submissions, you can set up your GTM trigger to fire only when the form has been successfully submitted. This means configuring the trigger to activate only when all required fields are filled in and the form passes validation checks.

    For more detailed guidance on integrating Google Tag Manager with your forms, please refer to our documentation here:
    https://formidableforms.com/knowledgebase/how-can-i-set-up-google-analytics-with-my-forms/#kb-set-up-google-tag-manager

    If you require further customization, you may need the assistance of a developer. While we do not provide support for custom code, you can find resources and possibly get help from the community or professional developers through these links:
    https://connect.formidableforms.com/
    https://formidableforms.com/knowledgebase/how-to-get-custom-development-help-with-codeable/

    Please let us know if you have any more questions or concerns.

    Best regards,
    Nathanael

    Thread Starter hfreijanes

    (@misteriobrewing)

    Thank you for confirming that the “Form Canceled” strategy is correct.

    I still can’t see a way to make the GTM trigger fire only when the form has been successfully submitted. I’m testing the form in Tag Assistant and there’s no difference in any values of the “form submission” events when the form was successfully submitted and when it was not.

    When creating the trigger in Google Tag Manager there’s an option to “Check Validation” but it asks to set some conditions to be met. I don’t know which conditions to set there because of what I’ve just explained in the previous paragraph.

    I’d really appreciate if you could guide me in the right direction.

    Plugin Support Njones35

    (@njones35)

    Hello,

    Thank you for your message and for detailing the issue you’re experiencing with Google Tag Manager triggers.

    To ensure that the GTM trigger fires only when the form has been successfully submitted, you’ll need to set up a custom event that fires on successful submission. This can be done by using JavaScript to push an event to the data layer when the form is successfully submitted.

    Here’s a basic example of how you might set up such an event:

    javascript<br>jQuery(document).on('frmFormComplete', function(event, form, response){<br>dataLayer.push({'event': 'formSubmissionSuccess'});<br>});<br>

    You would then create a GTM trigger that listens for the formSubmissionSuccess event.

    Please note that while we can provide general guidance, we do not offer support for writing, customizing, or debugging custom code. If you need further assistance with the implementation, you may consider reaching out to a developer or visiting resources like Codeable for custom development help.

    I hope this points you in the right direction. If you have any further questions, please let us know.

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.