Sha256: 1c087173a65be0c59e78c745388f36d868b278a1572f4e1b9175cf8d3f65b25c
Contents?: true
Size: 540 Bytes
Versions: 11
Compression:
Stored size: 540 Bytes
Contents
module Ahoy module Deckhands class UtmParameterDeckhand def initialize(landing_page) @landing_page = landing_page end def landing_params @landing_params ||= begin landing_uri = Addressable::URI.parse(@landing_page) rescue nil (landing_uri && landing_uri.query_values) || {} end end %w(utm_source utm_medium utm_term utm_content utm_campaign).each do |name| define_method name do landing_params[name] end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems