﻿trackCommunity();

function trackPageView(url) {
    _gaq.push(['_trackPageview', url]);
}

function trackEvent(category, action, label) {
    _gaq.push(['_trackEvent', category, action, label]);
}

function setCustomVar(id, name, value, visitorLevel){
    if (value != null) {
        _gaq.push(['_setCustomVar', id, name, communityValue, visitorLevel]);
    }
}

function popupAndTrack(url) {
    popup(url);
    trackPageView(url);

    return false;
}

function trackCommunity() {
    var communityValue = getCommunity();
    setCustomVar(1, 'Community', communityValue, 1)
}


