Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1325178

    i would like to add this onclick=”return gtag_report_conversion(‘https://sysop.com.mx/desarrollo-web-y-de-aplicaciones/’)” to the submit button, how can i do it?

    #1325254

    Hey sysop2018,
    Thank you for the link to your site, try adding this code to the end of your functions.php file in Appearance ▸ Editor:

    function add_gtag_to_contact_submit() { ?>
        <script>
    (function($) {
    $('#top.page-id-1607 .contact-landing .button[type=submit]').attr('onclick', 'return gtag_report_conversion(\'https://sysop.com.mx/desarrollo-web-y-de-aplicaciones/\')\;');
    })(jQuery);
    </script>
        <?php
    }
    add_action('wp_footer', 'add_gtag_to_contact_submit');

    Best regards,
    Mike

    #1406523

    Dear Support,

    Is it not possible to improve buttons, contact forms, menu points etc. with an advanced field or something else for such stuff instead of manipulating manual the functions?
    To make it easier to work with Google Analytics and Tag Managers?

    Best

    S.

    • This reply was modified 1 year, 6 months ago by Hokuspokus.
    #1406541

    Hi,
    Thanks for your suggestion, I have submitted this to our feature requests for the Dev Team to review.

    Best regards,
    Mike

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