Skip to content

Commit

Permalink
Update identifying-users-simplified.mdx (#1674)
Browse files Browse the repository at this point in the history
Updating the Python pseudocode for Simplified ID Merge.

Having the function:
def identify_user(request):
  properties = {
    "$device_id": uuid.uuid4(),
    "$identified_id": request.user.username
 
  }
  track_to_mp(request, "$identify", properties)

may cause confusion because $identify is not used id v3 nor is $identified_id. The main part of the pseudocode should suffice as an example as only $device_id and $user_id are used for v3
  • Loading branch information
Tofufu authored Dec 17, 2024
1 parent 96787ed commit e167f88
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,6 @@ def track_to_mp(request, event_name, properties):

# Note: leave the first argument blank here, since we're passing $device_id and $user_id as properties.
mp.track("", event_name, properties)

def identify_user(request):
properties = {
"$device_id": uuid.uuid4(),
"$identified_id": request.user.username

}
track_to_mp(request, "$identify", properties)
```
## Best Practices

Expand Down

0 comments on commit e167f88

Please sign in to comment.