Module: Touchpoints
- Defined in:
- lib/touchpoints.rb,
lib/touchpoints/engine.rb,
lib/touchpoints/version.rb,
app/controllers/concerns/touchpoints/tracker.rb
Defined Under Namespace
Modules: Tracker
Classes: Engine
Constant Summary
collapse
- VERSION =
'0.1.1'
- @@configuration =
{
session_name: '_touchpoints'.freeze,
utm_params: %w(utm_source utm_medium utm_campaign utm_term utm_content utm_uid).freeze,
logging: false,
model: 'Touchpoint'.freeze,
model_id: :id,
model_foreign_id: :user_id,
current_user_method: :current_user,
capacity: 22,
}
Class Method Summary
collapse
Class Method Details
15
16
17
18
19
|
# File 'lib/touchpoints.rb', line 15
def self.configure
yield Touchpoints
debug "Touchpoint configuration: #{@@configuration.inspect}"
end
|
.debug(message) ⇒ Object
29
30
31
32
33
|
# File 'lib/touchpoints.rb', line 29
def self.debug(message)
return unless get(:logging)
puts message
end
|
.get(option) ⇒ Object
25
26
27
|
# File 'lib/touchpoints.rb', line 25
def self.get(option)
@@configuration[option]
end
|
.set(option, value) ⇒ Object
21
22
23
|
# File 'lib/touchpoints.rb', line 21
def self.set(option, value)
@@configuration[option] = value
end
|