app/services/event.rb
def formatted_value(value)
    return value if value.is_a?(Float) || value.is_a?(Integer)

    value.respond_to?(:keys) ? value.to_json : value&.to_s
  end
##
# For json objects or hashes passed to Event#trigger as values in the `data` param, such as Feedback#search_criteria,
# we should format these as json for BigQuery, rather than strings, for easier manipulation by Performance Analysis.
# Floats and Integers should remain as they are. Do not pass Arrays to BigQuery without converting them to string:
# otherwise, it will give the error "Array specified for non repeated field" when the array has length of 1.
# @param [Object] value Any value in the data passed to the event.
For json objects or hashes passed to Event#trigger as values in the `data` param, such as Feedback#search_criteria,
we should format these as json for BigQuery, rather than strings, for easier manipulation by Performance Analysis.
Floats and Integers should remain as they are. Do not pass Arrays to BigQuery without converting them to string:
otherwise, it will give the error "Array specified for non repeated field" when the array has length of 1.
For json objects or hashes passed to Event#trigger as values in the ` data ` param such as Feedback#search_criteria we should format these as json for BigQuery rather than strings for easier manipulation by Performance Analysis . Floats and Integers should remain as they are . Do not pass Arrays to BigQuery without converting them to string : otherwise it will give the error " Array specified for non repeated field " when the array has length of 1 .
def formatted_value(value)
    return value if value.is_a?(Float) || value.is_a?(Integer)
    value.respond_to?(:keys) ? value.to_json : value&.to_s
  end
def formatted_value ( value ) return value if value . is_a? ( Float ) || value . is_a? ( Integer ) value . respond_to? ( :keys ) ? value . to_json : value &. to_s end
For json objects or hashes passed to Event#trigger as values in the `data` param, such as Feedback#search_criteria,
we should format these as json for BigQuery, rather than strings, for easier manipulation by Performance Analysis.
For json objects or hashes passed to Event#trigger as values in the ` data ` param such as Feedback#search_criteria we should format these as json for BigQuery rather than strings for easier manipulation by Performance Analysis .
value
value Any value in the data passed to the event.
value Any value in the data passed to the event .