Tuesday, May 17, 2016

Notes for Ahoy User Analytics Gem

Checking for a bot so that we can exclude it from the analytics

def bot?
  @bot ||= request ? Browser.new(request.user_agent).bot? : false
end

Location : Geocoder.search(@ip).first

Look at these classes:

RequestDeckhand
TechnologyDeckhand
TrafficSourceDeckhand
UtmParameterDeckhand

Dependent Gems

addressable, browser, geocoder, referer-parser, user_agent_parser, request_store, uuidtools, safely_block, rack-attack

No comments:

Post a Comment