Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change key (#2) #3

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Your events will now begin to flow to Survicate in device mode.

***identify***

In the SurvicateDestination plugin, the identify event from Segment is transferred to the setUserTrait method of Survicate. This is achieved within the identify function of the SurvicateDestination class. The traits and userId from the IdentifyEvent are extracted and set as user traits in Survicate using the setUserTrait method. The traits are a dictionary where each key-value pair is set as a user trait. The userId is also set as a user trait with the key "userId".
In the SurvicateDestination plugin, the identify event from Segment is transferred to the setUserTrait method of Survicate. This is achieved within the identify function of the SurvicateDestination class. The traits and userId from the IdentifyEvent are extracted and set as user traits in Survicate using the setUserTrait method. The traits are a dictionary where each key-value pair is set as a user trait. The user Id is also set as a user trait with the key "user_id".

***track***

Expand All @@ -56,4 +56,4 @@ Similarly, the screen method from Segment is used as the enterScreen method in S

***reset***

The reset method from Segment is used as the reset method in Survicate. This means that when you reset the user in Segment, it will be reset in Survicate.
The reset method from Segment is used as the reset method in Survicate. This means that when you reset the user in Segment, it will be reset in Survicate.
2 changes: 1 addition & 1 deletion Sources/SurvicateDestination/SurvicateDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class SurvicateDestination: DestinationPlugin {

public func identify(event: IdentifyEvent) -> IdentifyEvent? {
if let userId = event.userId {
SurvicateSdk.shared.setUserTrait(withName: "userId", value: userId)
SurvicateSdk.shared.setUserTrait(withName: "user_id", value: userId)
}

if let traits = event.traits?.dictionaryValue {
Expand Down
Loading