Skip to content

Instantly share code, notes, and snippets.

@onyxfish
Created March 19, 2013 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onyxfish/5196967 to your computer and use it in GitHub Desktop.
Save onyxfish/5196967 to your computer and use it in GitHub Desktop.
NPR Apps Analytics tags
<!-- GOOGLE ANALYTICS -->
<script type="text/javascript">
var _gaq = _gaq || [];
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-5828686-4']);
_gaq.push(['_setDomainName', 'npr.org']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- CHARTBEAT -->
<script type="text/javascript">
var _sf_async_config={};
/** CONFIGURATION START **/
_sf_async_config.uid = 18888;
_sf_async_config.domain = "npr.org";
/** CONFIGURATION END **/
(function(){
function loadChartbeat() {
window._sf_endpt=(new Date()).getTime();
var e = document.createElement("script");
e.setAttribute("language", "javascript");
e.setAttribute("type", "text/javascript");
e.setAttribute("src",
(("https:" == document.location.protocol) ?
"https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/" :
"http://static.chartbeat.com/") +
"js/chartbeat.js");
document.body.appendChild(e);
}
var oldonload = window.onload;
window.onload = (typeof window.onload != "function") ?
loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment