* adding 2 custom variables for , UserType and UserLevel, but so far it's not showing up. can't tell if it's due to a GA delay

This commit is contained in:
Seth Call 2013-09-28 18:41:19 +00:00
parent d7ada2d7d3
commit 6518e3a009
4 changed files with 23 additions and 2 deletions

View File

@ -70,7 +70,7 @@
}
function handleStartAudioQualification() {
app.setWizardStep(2);
app.setWizardStep(1);
app.layout.showDialog('ftue');
}

View File

@ -17,4 +17,5 @@ module ApplicationHelper
def bugsnag?
Rails.application.config.bugsnag_notify_release_stages.include? Rails.env
end
end

View File

@ -65,4 +65,21 @@ module SessionsHelper
request.env['HTTP_USER_AGENT'] =~ /JamKazam/
end
# used to help GA tracking. should result in one of Visitor, Registered User, or Paying Subscriber
def ga_user_level
if current_user.nil?
'Visitor'
else
'Registered User' # TODO: when paying subscriber exists, add to it
end
end
# used to help GA tracking. should result in either Fan or Musician
def ga_user_type
if current_user.nil?
'Fan'
else
current_user.musician? ? 'Musician' : 'Fan'
end
end
end

View File

@ -20,7 +20,10 @@
ga('create', '<%= Rails.application.config.ga_ua %>', 'jamkazam.com');
<% end %>
ga('send', 'pageview');
ga('send', 'pageview', {
dimension1: '<%= ga_user_level %>',
dimension2: '<%= ga_user_type %>'
});
})(window);
</script>
<% end %>