SAS How to: Set up Google Analytics custom dimensions using meta tags

Nov 6, 2015

One of the many helpful customizations in the Station Analytics System is the collection of public media specific meta data.  In addition to the default page data, additional information is tracked and stored in Custom Dimensions which can easily be added to standard or custom Google Analytics reports. This post will explain how to add the necessary information to your website so that it can easily be tracked by Google Analytics.

By default Google Analytics tracks information about pages including the URL and the title, but what if you are looking for more data like author, category or related program?  To track these using GA you would have to heavily customize the tracker. The SAS tracking code can track additional data easily by looking for desired data in meta tags on each page. One additional benefit of this method is that it is consistent across stations to allow comparisons and aggregations.

Currently, the SAS tracker looks for the following meta tags and sends them to custom dimensions in Google Analytics as listed in the table below:

Custom variables being tracked for member stations using SAS (updated 9.21.15).


Once they have been added to the html page source the meta tags should appear in the source code like this data from Steve's post about streaming:

<meta name="datePublished" content="2015-05-26" />
 <meta name="story_id" content="409797530" />
 <meta name="has_audio" content="0" />
 <meta name="programs" content="none" />
 <meta name="category" content="Analytics" />
 <meta name="keywords" content="Streaming Metrics" />
 <meta name="org_id" content="0" />
 <meta name="author" content="Steve Mulder" />
 <meta name="nid" content="1241" />
 <meta name="wordCount" content="590" />

  In order for the data to appear in your Google Analytics reports you must also set up the Custom Dimensions in your Google Analytics admin.  Step by step directions are available here. Even if you do not plan to track all of these elements it is important that you follow the steps completely to avoid incorrect data. 

Please let us know if there are additional tags that you would like to track by emailing We can implement custom dimension tracking that is specific to your station or get started on an enhancement that would be valuable to all member stations.  Once the meta tag is on your site's pages we can update the tracking code so that you can start seeing data almost immediately!