Class: GoogleAnalytics::Events::AnonymizeIp

Inherits:
GoogleAnalytics::Event show all
Defined in:
lib/google-analytics/events/events.rb

Overview

Anonymize the visitor IP address. This seems to be mandatory for European websites and actively enforced for German ones.

See the following comment by Roland Moriz for more information: https://github.com/bgarret/google-analytics-rails/pull/6#issuecomment-5946066

JavaScript equivalent:

ga('set', 'anonymizeIp', true);

Instance Attribute Summary

Attributes inherited from GoogleAnalytics::Event

#action, #name, #params

Instance Method Summary collapse

Methods inherited from GoogleAnalytics::Event

#single_event?

Constructor Details

#initializeAnonymizeIp

Returns a new instance of AnonymizeIp.



160
161
162
# File 'lib/google-analytics/events/events.rb', line 160

def initialize
  super('set', 'anonymizeIp', true)
end