diff --git a/HISTORY.md b/HISTORY.md index a75b791..908be9e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +2.2.0 / 2017-08-17 +================== + + * Added better support for comapnies using elevio V4 and logging users into the embeddable via the new setUser method + 2.1.0 / 2017-03-22 ================== diff --git a/lib/index.js b/lib/index.js index ef63dfd..0162a71 100644 --- a/lib/index.js +++ b/lib/index.js @@ -68,4 +68,7 @@ Elevio.prototype.identify = function(identify) { if (plan) user.groups = [plan]; if (objectKeys(traits).length > 0) user.traits = traits; window._elev.user = user; + if (typeof window._elev.setUser !== 'function') { + window._elev.setUser(user); + } }; diff --git a/package.json b/package.json index c7d0e59..e01792b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@segment/analytics.js-integration-elevio", "description": "The Elevio analytics.js integration.", - "version": "2.1.0", + "version": "2.2.0", "keywords": [ "analytics.js", "analytics.js-integration",