Sha256: 67873a925510f2830ea44845a39132fd1e90fcaae91d6bed3933b23fe0aac0eb

Contents?: true

Size: 898 Bytes

Versions: 2

Compression:

Stored size: 898 Bytes

Contents

class Visit
  include Mongoid::Document

  # associations
  belongs_to :user

  # required
  field :visitor_id, type: BSON::Binary

  # 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 :landing_page, type: String

  # traffic source
  field :referring_domain, type: String
  field :search_keyword, 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

  # 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

  field :started_at, type: Time
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ahoy_matey-1.0.1 lib/generators/ahoy/stores/templates/mongoid_visit_model.rb
ahoy_matey-1.0.0 lib/generators/ahoy/stores/templates/mongoid_visit_model.rb