Skip to content

Commit

Permalink
Change key (#2) (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkalamarz-survicate authored Dec 18, 2023
1 parent 112834e commit e12f8ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit e12f8ea

Please sign in to comment.