Module: GoogleAnalytics
- Defined in:
- lib/google-analytics-rails.rb,
lib/google-analytics/events.rb,
lib/google-analytics/version.rb,
lib/google-analytics/events/event.rb,
lib/google-analytics/events/events.rb,
lib/google-analytics/async_tracking_queue.rb,
lib/google-analytics/events/event_renderer.rb,
lib/google-analytics/events/event_collection.rb,
lib/google-analytics/events/event_collection_renderer.rb
Defined Under Namespace
Modules: Events, Rails Classes: AsyncTrackingQueue, Event, EventCollection, EventCollectionRenderer, EventRenderer, SingleEvent
Constant Summary collapse
- VERSION =
Gem version
"1.1.1"
Class Method Summary collapse
-
.max_custom_indices ⇒ Integer
Return the maximum number of custom dimension/metric indices for this type of account.
-
.premium_account=(value) ⇒ Object
Set whether or not the property is held under a premium account.
- .premium_account? ⇒ Boolean
- .script_source ⇒ String
-
.script_source=(src) ⇒ String
Set the current ga src.
-
.tracker ⇒ String
Get the current tracker id (UA-xxxxxx-x).
-
.tracker=(tracker) ⇒ Object
Set the current tracker id.
- .valid_tracker? ⇒ Boolean
Class Method Details
.max_custom_indices ⇒ Integer
Return the maximum number of custom dimension/metric indices for this type of account
68 69 70 |
# File 'lib/google-analytics-rails.rb', line 68 def self.max_custom_indices premium_account? ? MAX_PREMIUM_INDICES : MAX_REGULAR_INDICES end |
.premium_account=(value) ⇒ Object
Set whether or not the property is held under a premium account
62 63 64 |
# File 'lib/google-analytics-rails.rb', line 62 def self.premium_account=(value) @@premium_account = value end |
.premium_account? ⇒ Boolean
56 57 58 |
# File 'lib/google-analytics-rails.rb', line 56 def self.premium_account? @@premium_account ||= false end |
.script_source ⇒ String
41 42 43 |
# File 'lib/google-analytics-rails.rb', line 41 def self.script_source @@src ||= SCRIPT_SOURCES[:default] end |
.script_source=(src) ⇒ String
Set the current ga src.
47 48 49 50 51 52 53 |
# File 'lib/google-analytics-rails.rb', line 47 def self.script_source=(src) if SCRIPT_SOURCES.has_key?(src) @@src = SCRIPT_SOURCES[src] else @@src = src end end |
.tracker ⇒ String
Get the current tracker id (UA-xxxxxx-x).
25 26 27 |
# File 'lib/google-analytics-rails.rb', line 25 def self.tracker @@tracker ||= PLACEHOLDER_TRACKER end |
.tracker=(tracker) ⇒ Object
Set the current tracker id.
31 32 33 |
# File 'lib/google-analytics-rails.rb', line 31 def self.tracker=(tracker) @@tracker = tracker end |
.valid_tracker? ⇒ Boolean
36 37 38 |
# File 'lib/google-analytics-rails.rb', line 36 def self.valid_tracker? tracker.nil? || tracker == "" || tracker == PLACEHOLDER_TRACKER ? false : true end |