- Attribution should be installed by a developer.
- Attribution CANNOT be installed ONLY with Google Tag Manager.
- Do not minify or bundle Attribution snippet inside a webpack or it may render unstable in some conditions.
- Please try to avoid putting snippet inside a JS closure. You are still free to call
alias()from inside your JS app using
There are two main use cases for "alias" method:
used to when you really want to merge two use data into one, this could be if your user moved/created new account (for example due to technical issues) but you still want to see the whole hist history as one user.
you are doing "identify" call only on server-side. In this case would need previousId parameter to be Anonymous ID which you can access from JS snippet by calling Attribution.user().anonymousId(); (this method is not recommended unless you have specific needs and understand what you are doing).
Attribution.alias([userId], [previousId], [callback]);
|The new User ID you want to associate the user with.|
|The previous ID that the user was recognized by.|
|A callback function that gets called after a short timeout.|