• Resolved Falklan

    (@falklan)


    Hello!

    Site URL:
    https://www.pcmtech.biz/my-account

    I’m trying to integrate a Google Analytics jQuery button click event tracker into a site’s registration form.

    <p class=”form-row”>
    <?php wp_nonce_field( ‘woocommerce-register’, ‘register’ ); ?>
    <input type=”submit” class=”button” name=”register” value=”<?php _e( ‘Register’, ‘wpdance’ ); ?>” />
    <script>
    $(‘.button’).on(‘click’, function() {
    ga(‘send’, ‘event’, ‘button’, ‘click’, ‘Register’);
    });
    </script>
    </p>

    This does not function the way it should. The tracking is not triggered by clicking the “register” button.

    Can anyone offer some assistance please?

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter Falklan

    (@falklan)

    The theme utilized on this site simply doesn’t accept the jQuery code.

    It does function with the equivalent javascript code.

Viewing 1 replies (of 1 total)
  • The topic ‘Integrating GA Event Tracking jQuery Send Command’ is closed to new replies.