Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Phillip Ng 148 posts 250 karma points
    Dec 26, 2013 @ 22:03
    Phillip Ng
    0

    Adding custom markup to <form>

    Hello

    I am using Contour and, through Razor, customizing the output of the fields. The problem, however, is that I can't seem to locate where the <form> tag is coded. I'd like to add custom markup to each form and its <form> tag for Google Analytics -- specifically, to add an onSubmit event for the forms. For example:

    <form action=”” method=”post” onSubmit="_gaq.push(['_trackEvent', 'Contact', 'Contact Form Submission', 'Contact Form',, false]);”>

    I thought it'd be in /Umbraco/Plugins/umbracoContour/Views, but none of the cshtml files seem to contain the <form> tag. Is this rendered in a dll? If so, any other way we can add that event to the form tag? Thanks in advance for any assistance!

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Dec 26, 2013 @ 23:06
    Dennis Aaen
    0

    Hi Phillip,

    You want add the Google Analytics scripting code when the form has been submitted.

    Take a look a the link below and see if you could use this solution.

    http://our.umbraco.org/forum/umbraco-pro/contour/28090-Contour-and-Google-Analytics-Goals

    Hope this can help you.

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft