• Help
  • Back
  • Tealium Prism Firebase Dispatcher for iOS Reference
    • Firebase Dispatcher
      • Modules
      • – Types
      • FirebaseSettingsBuilder
      • FirebaseMappings
      • FirebaseCommand
      • FirebaseDestination
    • Command Reference
      • Mappings
      • LogEvent
      • SetUserID
      • SetUserProperty
      • SetDefaultParameters
      • SetSessionTimeout
      • SetAnalyticsCollectionEnabled
      • SetConsent
      • ResetData
      • InitiateConversionMeasurement
  • Tealium Prism Firebase Dispatcher for iOS Reference
  • > Command Reference

SetUserID Reference

SetUserID

Associates analytics data with a specific user.

command_name: setuserid · Firebase API: Analytics.setUserID(_:)

JSON Mappings

{
    "destination": { "key": "command_name" },
    "parameters": {
        "reference": { "key": "tealium_event" },
        "filter": { "value": "YOUR_EVENT_NAME" },
        "map_to": { "value": "setuserid" }
    }
},
{
    "destination": { "path": "user_id" },
    "parameters": { "reference": { "key": "user_id" } }
}

Programmatic

builder.setMappings { mappings in
    mappings.mapCommand(.setUserId).ifValueIn("tealium_event", equals: "user_login")
    mappings.mapFrom("user_id", to: .userId)
}

Passing an empty string clears the user ID. Use of this field must comply with Google’s Privacy Policy.

See Mappings for the shared mapping concepts used above.

© 2026 Tealium. All rights reserved. (Last updated: 2026-09-17)

Generated by jazzy ♪♫ v0.15.4, a Realm project.