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

Signatures for registerSetUserProperties appears to be incorrect #21

Open
mattpwalsh opened this issue Jul 12, 2017 · 0 comments
Open

Comments

@mattpwalsh
Copy link

mattpwalsh commented Jul 12, 2017

The current code has this:

$analyticsProvider.registerSetUserProperties(function (userId, traits, options, callback)

But the angulartics documentation says that setUserProperties first argument is a properties object:

$analytics.setUserProperties(properties)

This makes it difficult to use the segment plugin with other angulartics plugins since it changes the signature.

My suggestion would be to change the signature to no longer accept userId and start with the traits. Then implement the registerSetUsername method to just pass userId to the segment identify call.

Unfortunately this appears to be breaking change, so not sure how you'd want to handle the versioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant