Note: Adding Google Analytics tracking code to your station’s website will not automatically track your SoCast player. To track analytics for your player, follow the steps below in addition to setting up tracking for your website.
Create a Google Analytics Account: If you don’t already have one, follow the instructions here: Create a Google Analytics Account.
Set Up a Web Property: Learn how to set up a property for your player: Set Up a Property.
Create Your Tracking Code: Follow these instructions to generate your tracking code: Get Your Tracking Code.
Add the Tracking Code to Your Player:
UA-1234567-12
with your own UA ID):<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1234567-12', 'auto');
ga('send', 'pageview');
</script>
Allow up to 24 hours for your analytics data to appear. If you do not see results after this time:
When pasting code into the Custom Header HTML, be careful not to interfere with any other code already in that section.