var metas = document.getElementsByTagName('meta'); var olyticsTag = ""; var olyticsCategory = ""; // First we see if the page has any html meta tags if(metas && metas.length > 0) { // loop through the meta tags for(var oolltt = 0; oolltt < metas.length; oolltt++) { var oollttMeta = metas[oolltt]; var theNameAttribute = oollttMeta.getAttribute('name'); // is the meta tag an 'olyticsCategory' meta tag ? if(theNameAttribute && theNameAttribute == 'olyticsCategory' && oollttMeta.getAttribute('content')) { // the meta tag is an 'olyticsCategory' meta tag - lets grab the content of the tag to use in the analytics.track call. olyticsCategory = oollttMeta.getAttribute('content'); // is the meta tag an 'olyticsTag' meta tag ? } else if(theNameAttribute && theNameAttribute == 'olyticsTag' && oollttMeta.getAttribute('content')) { // the meta tag is an 'olyticsTag' meta tag - lets grab the content of the meta tag to use in the analytics.track call. olyticsTag = oollttMeta.getAttribute('content'); } } if(olyticsCategory.length > 0 || olyticsTag.length > 0) { // so at this point we have either an olyticsCategory and / or olyticsTag to pass in the analytics.track call. //fire the olytics.track call olytics.fire( { behaviorId: '2672C9123356A8B', category: olyticsCategory, tag: olyticsTag } ) Heat Treat Radio #3: Metallurgical Posterchildren: Anastasios Gavras - Heat Treat Today