Class: IscAnalytics::Bootstrap
Instance Method Summary
collapse
#clear_identify, #generate_queue_js, #identify, #keep_km_url_event, #set_properties, #set_property, #track_event
Constructor Details
#initialize(options = {}) ⇒ Bootstrap
Returns a new instance of Bootstrap.
8
9
10
11
12
|
# File 'lib/isc_analytics/bootstrap.rb', line 8
def initialize(options = {})
validate_providers_config
@session = options[:session] || {}
@opt_out = false
end
|
Instance Method Details
22
23
24
|
# File 'lib/isc_analytics/bootstrap.rb', line 22
def analytics_script_tags
Tags.scripts(analytics_scripts)
end
|
#opt_out! ⇒ Object
18
19
20
|
# File 'lib/isc_analytics/bootstrap.rb', line 18
def opt_out!
@opt_out = true
end
|
#opt_out? ⇒ Boolean
14
15
16
|
# File 'lib/isc_analytics/bootstrap.rb', line 14
def opt_out?
!!@opt_out
end
|
26
27
28
|
# File 'lib/isc_analytics/bootstrap.rb', line 26
def provider_script_tags
Tags.scripts(provider_scripts)
end
|
#queued_events ⇒ Object
30
31
32
33
|
# File 'lib/isc_analytics/bootstrap.rb', line 30
def queued_events
return nil if opt_out?
generate_queue_js
end
|