Skip to content

Commit 96e877a

Browse files
authored
Add ready signalling for Visual Tagger integration (#278)
* Add ready signalling for Visual Tagger integration * update version number
1 parent ce7281a commit 96e877a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

integrations/visual-tagger/lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44
var integration = require('@segment/analytics.js-integration');
55
var TracktorLib = require('@segment/tracktor');
6+
var when = require('do-when');
67

78
/**
89
* Expose `Visual Tagger` integration.
@@ -27,6 +28,8 @@ Tracktor.prototype.initialize = function() {
2728
);
2829
window.Tracktor = TracktorLib;
2930

31+
when(this.loaded, this.ready);
32+
3033
tracktor.start();
3134
};
3235

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@segment/analytics.js-integration-visual-tagger",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "The Visual Tagger analyticsjs integration",
55
"main": "lib/index.js",
66
"scripts": {
@@ -10,6 +10,7 @@
1010
"author": "",
1111
"license": "ISC",
1212
"dependencies": {
13-
"@segment/tracktor": "0.6.2"
13+
"@segment/tracktor": "0.6.2",
14+
"do-when": "^1.0.0"
1415
}
1516
}

0 commit comments

Comments
 (0)