Skip to content

Commit

Permalink
tweak identify ingestion logic for legacy identify payload
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinSchneider committed Apr 22, 2024
1 parent 678fd40 commit 4ab582c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def pre_existing_device

def provided_user_properties
# legacy instrumentation sends `identify` events with the user properties in the root of the event properties, and all other events with the user properties in the `user_attributes` key
all_user_properties = parsed_event.properties.dig('user') || parsed_event.properties.dig('user_attributes') || (parsed_event.name == 'identify' ? parsed_event.properties : {}) || {}
parsed_event.properties.dig('user') || (parsed_event.name == 'identify' ? parsed_event.properties : parsed_event.properties.dig('user_attributes')) || {}
end

def pre_existing_user_profile_for_provided_user_data
Expand Down

0 comments on commit 4ab582c

Please sign in to comment.