Click Tracking Not Executed
Click Tracking not executed
On navigational clicks (like a button to submit a form, which forwards the user to the next page displaying a "message received" page), there are race conditions involved. It is not guaranteed that the click-event signal will be sent before the page unloads to make room for the next page to be displayed in the browser.
With this very tricky situation, the JENTIS Data Capturing platform provides some methods to mitigate the impact of lost data. There are some topics that we must quickly cover before discussing solutions.
With each JENTIS state there is a grace period by default. This timeframe of 2000ms (2 seconds) will give async variables and promises to be resolved before the actual JENTIS State is computed and data transmitted from client to the JENTIS server.
This feature is meant to provide the opportunity to use async variable computation with JENTIS. On the other hand, the conflict with the click navigation arises because there is not enough time to await this grace period for this event.
To mitigate this impact, you can make sure that no variable in your setup returns explicitly "undefined" or is async. If no such variable is referenced, the grace period will not be triggered, and hence, all data will be sent immediately.
Identifying such variables can be a bit tricky. However, when in preview and with the developer toolbox open in the console JENTIS will report async-variables:

In the console log you will find the messages of "[VARIABLE] - Callback executed for variable" that indicate this situation described above.
You'd need either not to use those variables in the event of the click (meaning: it is not referenced in a tag or trigger) or if they are not async, not return "undefined" but a value instead (maybe "" - empty string). This will ensure that the grace period is circumvented.
In general, we recommend using the sendBeacon
transmission method as described in the state documentation. This method sends requests to JENTIS using the sendBeacon
API instead of XMLHttpRequest
, which can help prevent issues on pages that switch quickly.
Last updated
Was this helpful?