Audio player - play stats

Is there any chance of getting play stats with the audio player at some point? I use the audio player on a number of projects but installing code on each website in order to track plays is so arduous. It feels like such an obvious, necessary function to add. Is there something preventing Elfsight adding this function?

Any thoughts would be welcome - thanks!

2 Likes

@user627 thanks a lot for your suggestion!

This is a nice feature, and I guess we really shout give a thought to it :thinking:

By the way, what exactly you’d love to see included in the stats?

1 Like

Thanks for your reply @Helga. I think the audio player just needs to report the number of people who have clicked play. This data should be available alongside the existing statistics that show domain visits. I use the audio player with a number of clients, all of who are requesting this, as installing code on the site and measuring using GA is too arduous. Thanks!

3 Likes

@user627 Copy that!

Let’s hope we will be able to consider this feature request. Now, we have to pick the most wanted ones first since we’ve got quite a lot of them already.

But you’re welcome to ask your clients to vote for this idea here, it must increase the chances for the release! :slight_smile:

Being able to see how many users clicked play is a frequent request from my clients. I agree with user627 that being able to see that stat alongside widget views would be most efficient and transparent from a creator standpoint.

2 Likes

Hi @Kristine :wave:

I cannot but agree with you that this feature would be really helpful!

I’ve drawn our dev team’s attention to this request, and, hopefully, they will find it possible to include it in one of our future updates :slightly_smiling_face:

Thanks a lot for sharing your idea and welcome to Community!

1 Like

Hi there! Checking in if there is any movement on this request for visibility on click stats per player? We’ve been incorporating more audio players into our pages and have continued to receive requests for clicks internally and from clients.

In the interim, do you or your team recommend any solutions for how we could acquire that sans visibility on the elfsight platform?

1 Like

Hi @Kristine :wave:

Unfortunately, we haven’t got any updates from our dev team yet.

We see that this feature is gaining votes and we do realize its importance to you, so we’ll try our best to take it under consideration in the future updates.

Thanks a bunch for pointing us in this direction!

As a workaround, you can use the Google Analytics code to track the number of clicks on Play button.

You need to add this part of the code to your website <head>:

<script async src="https://www.googletagmanager.com/gtag/js?id=**UA-ID** "></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '**UA-ID** ');
</script>

In the code above, you need to replace UA-ID with your actual website ID for Google Analytics. If you are using Google Analytics 4, you need to use G-ID instead of UA-ID (see screenshot). This article will help you find your ID - Find your Google tag ID.

And then just add the rest of the script right before closing </body> tag:

<script>
    function eappsDispatchAnalyticsEvent(event, selector, config) {
      function sendEvent(config) {
        if (typeof ga !== "undefined") {
          ga('send', 'event', {
            eventAction: config.action,
            eventCategory: config.category,
            eventLabel: config.label
          });
        }
        if (typeof gtag !== "undefined") {
          gtag('event', config.action, {
            'event_category': config.category,
            'event_label': config.label
          });
        }
      }
      function isHitClass(e, selector) {
        return e.target && e.target.closest(selector)
      }
      if (isHitClass(event, selector)) {
        sendEvent(config);
      }
    }
    document.addEventListener('click', function (event) {
      eappsDispatchAnalyticsEvent(event, '[class*="Play__Component-sc"]', {
        action: 'click',
        category: 'Elfsight Player Play Button',
        label: 'Elfsight Player Play Button'
      });
    }, true);
  </script>

Check it out and let me know how it worked for you :slightly_smiling_face: