app/helpers/analytics_helper.rb
# Custom dimensions on Google Analytics are named `dimensionX` where X
# is an index from 1 to 20 (there is a limit of 20 per GA property).
# https://support.google.com/analytics/answer/2709828?hl=en
#
Custom dimensions on Google Analytics are named `dimensionX` where X
is an index from 1 to 20 (there is a limit of 20 per GA property).
Custom dimensions on Google Analytics are named ` dimensionX ` where X is an index from 1 to 20 ( there is a limit of 20 per GA property ) .
def custom_dimensions(hash)
    dimensions = hash || {}
    CUSTOM_DIMENSIONS_MAP.each do |key, name|
      dimensions[name] = dimensions.delete(key) if dimensions.key?(key)
    end
    dimensions
  end
def custom_dimensions ( hash ) dimensions = hash || { } CUSTOM_DIMENSIONS_MAP . each do | key , name | dimensions [ name ] = dimensions . delete ( key ) if dimensions . key? ( key ) end dimensions end
Custom dimensions on Google Analytics are named `dimensionX` where X
is an index from 1 to 20 (there is a limit of 20 per GA property).
Custom dimensions on Google Analytics are named ` dimensionX ` where X is an index from 1 to 20 ( there is a limit of 20 per GA property ) .
hash