Here is the use case:
The app is a ruby rails app, that serves HTML so no real sense of a Javascript application.
I am generating a fingerprint using fingerprintjs, which returns the result with a callback. This callback sometimes returns quickly or slowly, which seems to be based on the browser. For example in chrome it returns quickly, and on Firefox it returns slowly.
And in some cases, the visit has already been created. So when I call ahoy.configure in the callback the visit is already created and the fingerprint is never set.
A couple of thoughts:
- whenever configure is called it updates the visit.
createVisit is exposed or a new helper method is created upsertVisit.
Other ideas? Am I thinking about this incorrectly?
Here is the use case:
The app is a ruby rails app, that serves HTML so no real sense of a Javascript application.
I am generating a fingerprint using fingerprintjs, which returns the result with a callback. This callback sometimes returns quickly or slowly, which seems to be based on the browser. For example in chrome it returns quickly, and on Firefox it returns slowly.
And in some cases, the visit has already been created. So when I call
ahoy.configurein the callback the visit is already created and the fingerprint is never set.A couple of thoughts:
createVisitis exposed or a new helper method is createdupsertVisit.Other ideas? Am I thinking about this incorrectly?