• Resolved crmengi

    (@crmengi)


    I am looking to add google conversion tracking to the submit button and would like to know if there is an existing way to do this or if I will need to create a custom version with the gtag to prevent it being overwritten by product updates.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter crmengi

    (@crmengi)

    To be clear this is in reference to the free plugin. We are using a shortcode to display our Dynamics Lead Form and would like to track incoming submissions from the website using Google Analytics by adding the following Snippet to the submit button of the form:

    onclick=”return gtag_report_conversion(”)”

    We need to know if there is a supported way of adding this snippet currently or if we would need to create a custom Twig template to support the gtag reporting.

    Plugin Author alexacrm

    (@alexacrm)

    Hi @crmengi

    you can easily inject your javascript after the form loads. The example below uses jQuery.

    
    $( document ).ready(function() {
      $('input[name="entity_form_submit"]').click(
        function(){ return gtag_report_conversion(); }
      );
    });
    

    HTH
    George

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding Google Conversion Tracking to the form’ is closed to new replies.