Skip to content

Commit

Permalink
send_request_to_ga was attempting to join nil strings
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorrall committed Dec 4, 2011
1 parent 480862a commit dba577b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RailsApplication1/app/controllers/ga_controller.rb
Expand Up @@ -84,8 +84,10 @@ def send_request_to_ga(utmurl)

#puts "--------sending request to GA-----------------------"
#puts utmurl
open(utmurl,"User-Agent" => request.env["HTTP_USER_AGENT"],
"Header" => ("Accepts-Language: " + request.env["HTTP_ACCEPT_LANGUAGE"]))
user_agent = request.env["HTTP_USER_AGENT"] || ''
user_language = request.env["HTTP_ACCEPT_LANGUAGE"] || ''
open(utmurl, "User-Agent" => user_agent,
"Header" => ("Accepts-Language: " + user_language))
end

# Track a page view, updates all the cookies and campaign tracker,
Expand Down

0 comments on commit dba577b

Please sign in to comment.