How Do I Add Google Analytics Tracking Code to My SoCast Player?
How Do I Add Google Analytics Tracking Code to My SoCast Player?
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.
Step-by-Step Instructions
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:
- Go to your SoCast Player Admin: Player Custom HTML.
- Paste your Google Analytics tracking code as the last item in the Custom Footer HTML section. (You can also place it in the Custom Header HTML section, but the Footer is recommended.)
- Your code should look similar to the example below (replace
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>
Important Notes
Allow up to 24 hours for your analytics data to appear. If you do not see results after this time:
- Double-check that you copied and pasted the full tracking code.
- Make sure the UA ID matches the one associated with your website.
- If you still experience issues, please contact SoCast Support.
When pasting code into the Custom Header HTML, be careful not to interfere with any other code already in that section.
Related Articles
How Do I Add a Clickable PDF Link to a Page in SoCast?
How Do I Add a Clickable PDF Link to a Page in SoCast? Who Is This Article For? All users with access to Pages Applicable to all themes Follow these instructions to add a clickable PDF link to a page, blog post, or other content area in SoCast. ...
What Is the Complete Website Launch Checklist for Your SoCast Website?
What Is the Complete Website Launch Checklist for Your SoCast Website? Who Is This For? Roles: SoCast Account Admins, Content Editors, Promotions Staff Applicable To: All Themes After your kick-off call with your SoCast Onboarding Specialist, you’re ...
How Do I Add Tracking Code or Custom HTML to My Web Player?
How Do I Add Tracking Code or Custom HTML to My Web Player? If you need to add tracking code or other custom HTML to your web player, follow these steps: Navigate to Player > Radio Stream Settings. Click Edit Skin. Scroll to the bottom of the page to ...
How Do I Add Custom JavaScript To The SoCast Engage Web Player?
Log in to SoCast Engage. Go to Player > Radio Stream Settings. Click the Edit Skin button for the stream you wish to edit. Scroll down to the Custom HTML section. Paste your JavaScript code (such as Adswizz listener ID scripts) into the Footer ...
How Do I Set Up Player Ad Code in SoCast?
How Do I Set Up Player Ad Code in SoCast? Who Is This For? This guide is for users with Advertising permissions. Applicable to: All themes. Step-by-Step Guide Go to the Player Advertising settings: http://admin.socastsrm.com/advertising/player Make ...