Skip to content

Set Custom User Id via script tag attribute #687

@YassineElbouchaibi

Description

@YassineElbouchaibi

Hello! It would be nice to be able to set a custom user id directly via attributes of the script tag used to load rybbit/script.js. This would be nice mainly because since Rybbit V2, script.js's main function is now async. This means that identification can't be done via script.onLoad -> rybbit.identify(userId) as rybbit is not always globally defined yet and it causes a race condition. Being able to pass the customUserId as an attribute would solve the problem.

Proposal:

If you are happy with the proposal above and the feature request I can go ahead and implement it. Let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions