Sha256: 068fa6c2bde60fff7edf97bc47f889358619d9223bd7c8fb7f62b5cabb525750

Contents?: true

Size: 1.15 KB

Versions: 38

Compression:

Stored size: 1.15 KB

Contents

class Ahoy::Visit
  include Mongoid::Document

  # associations
  has_many :events, class_name: "Ahoy::Event"
  belongs_to :user, index: true, optional: true

  # required
  field :visit_token, type: String
  field :visitor_token, type: String

  # the rest are recommended but optional
  # simply remove the columns you don't want

  # standard
  field :ip, type: String
  field :user_agent, type: String
  field :referrer, type: String
  field :referring_domain, type: String
  field :landing_page, type: String

  # technology
  field :browser, type: String
  field :os, type: String
  field :device_type, type: String

  # location
  field :country, type: String
  field :region, type: String
  field :city, type: String
  field :latitude, type: Float
  field :longitude, type: Float

  # utm parameters
  field :utm_source, type: String
  field :utm_medium, type: String
  field :utm_term, type: String
  field :utm_content, type: String
  field :utm_campaign, type: String

  # native apps
  field :app_version, type: String
  field :os_version, type: String
  field :platform, type: String

  field :started_at, type: Time

  index({visit_token: 1}, {unique: true})
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
wco_models-3.1.0.202 app/models/ahoy/visit.rb
wco_models-3.1.0.201 app/models/ahoy/visit.rb
wco_models-3.1.0.199 app/models/ahoy/visit.rb
wco_models-3.1.0.198 app/models/ahoy/visit.rb
wco_models-3.1.0.197 app/models/ahoy/visit.rb
wco_models-3.1.0.196 app/models/ahoy/visit.rb
wco_models-3.1.0.195 app/models/ahoy/visit.rb
wco_models-3.1.0.194 app/models/ahoy/visit.rb
wco_models-3.1.0.193 app/models/ahoy/visit.rb
wco_models-3.1.0.192 app/models/ahoy/visit.rb
wco_models-3.1.0.191 app/models/ahoy/visit.rb
wco_models-3.1.0.190 app/models/ahoy/visit.rb
wco_models-3.1.0.189 app/models/ahoy/visit.rb
wco_models-3.1.0.188 app/models/ahoy/visit.rb
wco_models-3.1.0.187 app/models/ahoy/visit.rb
wco_models-3.1.0.184 app/models/ahoy/visit.rb
wco_models-3.1.0.183 app/models/ahoy/visit.rb
wco_models-3.1.0.182 app/models/ahoy/visit.rb
wco_models-3.1.0.181 app/models/ahoy/visit.rb
wco_models-3.1.0.180 app/models/ahoy/visit.rb