diff --git a/lib/analytics/GoogleAnalytics.rb b/lib/analytics/GoogleAnalytics.rb index 7d8957d..99439db 100644 --- a/lib/analytics/GoogleAnalytics.rb +++ b/lib/analytics/GoogleAnalytics.rb @@ -38,6 +38,6 @@ class GoogleAnalytics private def _get_other_commands(config) - @commands.push(ANONYMIZE_IP_CODE % config.fetch(:anonymizeIp, false)) + @commands.push(ANONYMIZE_IP_CODE % config.fetch("anonymizeIp", false)) end end \ No newline at end of file diff --git a/test/GoogleAnalyticsTest.rb b/test/GoogleAnalyticsTest.rb index 403585c..5e7e25b 100644 --- a/test/GoogleAnalyticsTest.rb +++ b/test/GoogleAnalyticsTest.rb @@ -28,7 +28,7 @@ class TestGoogleAnalytics < Test::Unit::TestCase def test_anonymize_true googleAnalytics = GoogleAnalytics.new( {"id" => "UA-123-456", "anonymizeIp" => true} ) - assert_match(/\('set', 'anonymizeIp', false\);/, googleAnalytics.render()) + assert_match(/\('set', 'anonymizeIp', true\);/, googleAnalytics.render()) end end \ No newline at end of file