Sha256: eed1da940aaeb94cce19a0a27174978ba42eb3801d3580ab2c9e0613e5f2c67f
Contents?: true
Size: 566 Bytes
Versions: 16
Compression:
Stored size: 566 Bytes
Contents
module Ahoy module Deckhands class TrafficSourceDeckhand def initialize(referrer) @referrer = referrer end def referring_domain @referring_domain ||= Addressable::URI.parse(@referrer).host.first(255) rescue nil end def search_keyword @search_keyword ||= (self.class.referrer_parser.parse(@referrer)[:term][0..255] rescue nil).presence end # performance hack for referer-parser def self.referrer_parser @referrer_parser ||= RefererParser::Parser.new end end end end
Version data entries
16 entries across 16 versions & 1 rubygems