Module: Gamco::Helper

Defined in:
lib/gamco/helper.rb

Instance Method Summary collapse

Instance Method Details

#ga_javascript_tags(tag_id: Configuration.tag_id, **options) ⇒ Object

Raises:



5
6
7
8
9
# File 'lib/gamco/helper.rb', line 5

def ga_javascript_tags(tag_id: Configuration.tag_id, **options)
  return unless Configuration.active
  raise Errors::NoTagId unless tag_id.present?
  ga_builder.javascript_tags(tag_id, options)
end

#ga_secure(value) ⇒ Object



16
17
18
19
# File 'lib/gamco/helper.rb', line 16

def ga_secure(value)
  return unless value.present?
  Configuration.secure.call(value)
end

#ga_tag(type, event, options = {}) ⇒ Object



11
12
13
14
# File 'lib/gamco/helper.rb', line 11

def ga_tag(type, event, options = {})
  return unless Configuration.active
  ga_builder.tag(type, event, options)
end