feat(Amplitude): enable referrer

This commit is contained in:
Hristo Terezov 2019-11-29 15:01:46 +00:00
parent 9191000da4
commit 1aaaae24ee
2 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,7 @@ export default class AmplitudeHandler extends AbstractHandler {
host
};
amplitude.getInstance(this._amplitudeOptions).init(amplitudeAPPKey);
amplitude.getInstance(this._amplitudeOptions).init(amplitudeAPPKey, undefined, { includeReferrer: true });
if (user) {
amplitude.getInstance(this._amplitudeOptions).setUserId(user);

View File

@ -35,9 +35,12 @@ class Amplitude {
* Sets an identifier for the current user.
*
* @param {string} userId - The new user id.
* @param {string} opt_userId - Currently not used.
* @param {Object} opt_config - Currently not used.
* @param {Function} opt_callback - Currently not used.
* @returns {void}
*/
setUserId(userId) {
setUserId(userId, opt_userId, opt_config, opt_callback) { // eslint-disable-line camelcase, no-unused-vars
AmplitudeNative.setUserId(this._instanceName, userId);
}