mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 22:21:11 +00:00
Fix ahoy tracking and visits
This commit is contained in:
parent
b54e3f7ab9
commit
3bb73f27cf
6 changed files with 38 additions and 21 deletions
11
db/migrate/20180312100045_create_ahoy_visits_and_events.rb
Normal file
11
db/migrate/20180312100045_create_ahoy_visits_and_events.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateAhoyVisitsAndEvents < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :visits, :visit_token, :string
|
||||
add_column :visits, :visitor_token, :string
|
||||
|
||||
add_index :visits, [:visit_token], unique: true
|
||||
add_index :ahoy_events, [:name, :time]
|
||||
end
|
||||
end
|
||||
|
|
@ -18,6 +18,7 @@ ActiveRecord::Schema.define(version: 20180316220446) do
|
|||
t.string "name"
|
||||
t.text "properties"
|
||||
t.datetime "time"
|
||||
t.index ["name", "time"], name: "index_ahoy_events_on_name_and_time"
|
||||
t.index ["time"], name: "index_ahoy_events_on_time"
|
||||
t.index ["user_id"], name: "index_ahoy_events_on_user_id"
|
||||
t.index ["visit_id"], name: "index_ahoy_events_on_visit_id"
|
||||
|
|
@ -651,7 +652,10 @@ ActiveRecord::Schema.define(version: 20180316220446) do
|
|||
t.string "utm_content"
|
||||
t.string "utm_campaign"
|
||||
t.datetime "started_at"
|
||||
t.string "visit_token"
|
||||
t.string "visitor_token"
|
||||
t.index ["user_id"], name: "index_visits_on_user_id"
|
||||
t.index ["visit_token"], name: "index_visits_on_visit_token", unique: true
|
||||
end
|
||||
|
||||
create_table "votes", force: :cascade do |t|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue