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

Aug 26, 2014

On August Station Analytics insights webinar we talked about data that was collected using custom variables in Google Analytics.  If you missed that webinar you can view the video. For Core Publisher stations the digital services developers handled the set up, but if you are not using Core Publisher here is how you can start tracking additional data about your site.

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 variables 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 like this data from Steve's post about streaming:

<meta name="keywords" content="Streaming Metrics" />
<meta name="has_audio" content="0"/>
<meta name="programs" content="none"/>
<meta name="org_id" content="0"/>
<meta name="author" content="Steve Mulder"/>
<meta name="nid" content="1056"/>
<meta name="category" content="Analytics"/>

Please let us know if there are additional tags that you would like to track by emailing analytics@ds.npr.org. We can implement custom variable 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!