AJAX and client-side trackingΒΆ

If you want to track events client-side, or you’re running a site that uses a lot of AJAX (like Poddle.fm), you’ll get automatic access to the bambu.analytics namespace within JavaScript, and you can call track() to handle client-side events or AJAX page updates (ie: via window.pushstate).

Here’s an example event used on Poddle.fm when a user clicks the Play button on an episode of a podcast:

        function() {
            // Play the audio

            // Track the click event
                    category: 'Audio',
                    action: 'play'