Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit 889224c

Browse files
duellsyHan
authored andcommitted
Added support for using new setUser method (#9)
* Added support for using new setUser method. This helps to future proof for companies using the latest version of the embeddable
1 parent f5585b2 commit 889224c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.2.0 / 2017-08-17
2+
==================
3+
4+
* Added better support for comapnies using elevio V4 and logging users into the embeddable via the new setUser method
5+
16
2.1.0 / 2017-03-22
27
==================
38

lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@ Elevio.prototype.identify = function(identify) {
6868
if (plan) user.groups = [plan];
6969
if (objectKeys(traits).length > 0) user.traits = traits;
7070
window._elev.user = user;
71+
if (typeof window._elev.setUser !== 'function') {
72+
window._elev.setUser(user);
73+
}
7174
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@segment/analytics.js-integration-elevio",
33
"description": "The Elevio analytics.js integration.",
4-
"version": "2.1.0",
4+
"version": "2.2.0",
55
"keywords": [
66
"analytics.js",
77
"analytics.js-integration",

0 commit comments

Comments
 (0)