|
|
|
@ -15,7 +15,7 @@ export default class AmplitudeHandler extends AbstractHandler { |
|
|
|
|
constructor(options) { |
|
|
|
|
super(); |
|
|
|
|
|
|
|
|
|
const { amplitudeAPPKey, host } = options; |
|
|
|
|
const { amplitudeAPPKey, host, user } = options; |
|
|
|
|
|
|
|
|
|
if (!amplitudeAPPKey) { |
|
|
|
|
throw new Error('Failed to initialize Amplitude handler, no APP key'); |
|
|
|
@ -28,6 +28,10 @@ export default class AmplitudeHandler extends AbstractHandler { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
amplitude.getInstance(this._amplitudeOptions).init(amplitudeAPPKey); |
|
|
|
|
|
|
|
|
|
if (user) { |
|
|
|
|
amplitude.getInstance(this._amplitudeOptions).setUserId(user); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|