• Hello,

    I try to trigger an GA event when a button is clicked.

    Is used that script :

    <script>
    jQuery(document).ready(function() {
    jQuery(‘.ga-track’).on(‘click’, function(e) {
    ga(‘send’, ‘event’, ‘Boton’, ‘Clic’, ‘Prueba’, ‘0’ );
    });
    });
    </script>

    My button got the class “ga-track”

    But when i click it i have that error :
    “Uncaught ReferenceError: ga is not defined”

    Any idea on how i can fix that ?

    Thank you ??

  • The topic ‘Trigger GA event on click’ is closed to new replies.