Better location for isReady reset
Andrew Kane
committed Aug 19, 2016
commit d66800843c4fb970e973755b847710195b9ba701
Showing 1
changed file with
2 additions
and 2 deletions
vendor/assets/javascripts/ahoy.js
+2
-2
| @@ | @@ -137,8 +137,9 @@ |
| }; | |
| } | |
| - | // main |
| function createVisit() { | |
| + | isReady = false; |
| + | |
| visitId = ahoy.getVisitId(); | |
| visitorId = ahoy.getVisitorId(); | |
| track = getCookie("ahoy_track"); | |
| @@ | @@ -217,7 +218,6 @@ |
| ahoy.track = function (name, properties) { | |
| if (!ahoy.getVisitId()) { | |
| - | isReady = false; |
| createVisit(); | |
| } | |