Skip to content

Commit 89ab62b

Browse files
authored
Syncing user pilot with its last version (#637)
1 parent ecef8eb commit 89ab62b

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

integrations/userpilot/lib/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ Userpilot.prototype.loaded = function() {
4747
*/
4848

4949
Userpilot.prototype.load = function(callback) {
50-
load('//js.userpilot.io/' + this.options.appToken + '/latest.js', callback);
50+
window.userpilotSettings = { token: this.options.appToken };
51+
load('//js.userpilot.io/sdk/latest.js', callback);
5152
};
5253

5354
/**
@@ -82,7 +83,6 @@ Userpilot.prototype.identify = function(identify) {
8283
window.userpilot.identify(identify.userId(), traits);
8384
};
8485

85-
8686
/**
8787
* Track.
8888
*
@@ -94,12 +94,10 @@ Userpilot.prototype.identify = function(identify) {
9494

9595
Userpilot.prototype.group = function(group) {
9696
var companyId = group.groupId(),
97-
traits = group.traits();
98-
if (window.userpilot.group)
99-
window.userpilot.group(companyId, traits);
97+
traits = group.traits();
98+
if (window.userpilot.group) window.userpilot.group(companyId, traits);
10099
};
101100

102-
103101
/**
104102
* Group.
105103
*

integrations/userpilot/package.json

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

0 commit comments

Comments
 (0)