Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 20, 2012
Jonathan Taylor Set the utma instance variable so that we can pull it out later to pe…
…rsist it in the users cookie
@deadprogram deadprogram Merge pull request #11 from jontaylor/set_utma_instance_variable
Set the @utma instance variable if gabba generates it
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/gabba/gabba.rb
7 lib/gabba/gabba.rb
@@ -22,7 +22,7 @@ class Gabba
ESCAPES = %w{ ' ! * ) }
- attr_accessor :utmwv, :utmn, :utmhn, :utmcs, :utmul, :utmdt, :utmp, :utmac, :utmt, :utmcc, :user_agent
+ attr_accessor :utmwv, :utmn, :utmhn, :utmcs, :utmul, :utmdt, :utmp, :utmac, :utmt, :utmcc, :user_agent, :utma
# Public: Initialize Gabba Google Analytics Tracking Object.
@@ -295,9 +295,8 @@ def identify_user(utma)
# create magical cookie params used by GA for its own nefarious purposes
def cookie_params(utma1 = random_id, utma2 = rand(1147483647) + 1000000000, today =
- utma = @utma
- utma ||= "1.#{utma1}00145214523.#{utma2}.#{today.to_i}.#{today.to_i}.15"
- "__utma=#{utma};+__utmz=1.#{today.to_i}.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);"
+ @utma ||= "1.#{utma1}00145214523.#{utma2}.#{today.to_i}.#{today.to_i}.15"
+ "__utma=#{@utma};+__utmz=1.#{today.to_i}.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);"
# sanity check that we have needed params to even call GA

No commit comments for this range

Something went wrong with that request. Please try again.