Skip to content

Commit

Permalink
Work toward out-bound link tracker for ab testing
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-bernhardt committed Jan 29, 2024
1 parent e029120 commit e1b375d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/record_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ class RecordController < ApplicationController

include RecordHelper

def out
url = params[:url]
end

def view
id = params[:id]
index = ENV.fetch('TIMDEX_INDEX', nil)
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ def results
# if we are loading results, the user submitted the form - so this experiment is finished
ab_finished(:ui_colors)

# ab_test(:result_format)

# hand off to Enhancer chain
@enhanced_query = Enhancer.new(params).enhanced_query

Expand Down
1 change: 1 addition & 0 deletions app/views/record/out.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>This would redirect you.</p>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
get 'issn', to: 'fact#issn'
get 'pmid', to: 'fact#pmid'

get 'out/(:url)', to: 'record#out'
get 'record/(:id)',
to: 'record#view',
as: 'record',
Expand Down

0 comments on commit e1b375d

Please sign in to comment.