Skip to content

Instantly share code, notes, and snippets.

@kristianhellquist
Created June 27, 2011 12:22
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 kristianhellquist/1048762 to your computer and use it in GitHub Desktop.
Save kristianhellquist/1048762 to your computer and use it in GitHub Desktop.
commit 71add8105fd6802ff4198096aa35a3d06bab09fb
Author: Tomasz Warkocki <warkocz@codequest.eu>
Date: Wed Dec 1 13:55:24 2010 +0100
changed mnduser google analytics value from md5 to id
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 529e479..bd47d6b 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -65,13 +65,13 @@ module ApplicationHelper
goal_tracking = []
if @user
- custom_tracking << "_gaq.push(['_setCustomVar', 2, 'mnduser', '#{@user.analytics_id}', 1]);"
+ custom_tracking << "_gaq.push(['_setCustomVar', 2, 'mnduser', '#{@user.id}', 1]);"
custom_tracking << "_gaq.push(['_setCustomVar', 3, 'mndtype', '#{@user.class.to_s}', 1]);"
custom_tracking << "_gaq.push(['_setCustomVar', 4, 'mndloggedin', 1, 3]);"
end
if defined?(@item) && (params[:controller] == "pressroom" || params[:controller] == "view")
- custom_tracking << "_gaq.push(['_setCustomVar', 5, 'mdnitem', '#{@item.class.to_s.downcase}_#{@item.id}', 3]);"
+ custom_tracking << "_gaq.push(['_setCustomVar', 5, 'mnditem', '#{@item.class.to_s.downcase}_#{@item.id}', 3]);"
end
unless session[:analytics].blank?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment