mirror of
https://github.com/hendrikschneider/jekyll-analytics
synced 2024-11-10 06:14:18 +00:00
Fetch the correct "anonymizeIp" config
Something in jekyll (at least on my 4.0 install) stringifies all config keys, so `:anonymizeIp` did never fetch the real value. This change fixes that.
This commit is contained in:
parent
acac96a898
commit
ccad6672f7
2 changed files with 2 additions and 2 deletions
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue