Class: PiwikAnalytics::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/piwik_analytics/configuration.rb

Instance Method Summary collapse

Instance Method Details

#disabled?Boolean

Whether or not to disable Piwik. Defaults to false.

Returns:

  • (Boolean)


40
41
42
# File 'lib/piwik_analytics/configuration.rb', line 40

def disabled?
  @disabled ||= (user_configuration_from_key('disabled') || false)
end

#id_siteObject

The ID of the tracked website Defaults to 1



24
25
26
# File 'lib/piwik_analytics/configuration.rb', line 24

def id_site
  @id_site ||= (user_configuration_from_key('id_site') || 1)
end

#protocolObject

The protocol for requests to the Piwik Defaults to nil



16
17
18
# File 'lib/piwik_analytics/configuration.rb', line 16

def protocol
  @protocol ||= user_configuration_from_key('protocol')
end

#urlObject

The url of the Piwik instance Defaults to localhost



8
9
10
# File 'lib/piwik_analytics/configuration.rb', line 8

def url
  @url ||= (user_configuration_from_key('url') || 'localhost')
end

#use_async?Boolean

Whether or not to use the async tracking Defaults to false

Returns:

  • (Boolean)


32
33
34
# File 'lib/piwik_analytics/configuration.rb', line 32

def use_async?
  @use_async ||= (user_configuration_from_key('use_async') || false)
end