This section explains the specification called "queuing of event data waiting to be sent" to reduce the loss of events sent from tags.
Overview
KARTE's tracking tag may resend events when event sending by user tags or custom event tags fails due to a specification called "queuing of event data waiting to be sent."
- User tags and custom event tags (
krt('send', 'event name')
), if an event is generated, even if the event transmission fails for some reason, the event will be resent at the next PV. - In particular, when capturing an event for a link click that accompanies a page transition, even if the event sending process is canceled by the page transition process, the click event will be resent the next time tracking tag is loaded.
- なお、この再送処理により発生したイベントが接客のトリガーになり意図しないタイミングで接客が表示されることはありません
important point
- This function does not guarantee that events will not be missed 100%.
- If the event was resent, the date and time the event was sent (
date
) is not the date and time when the tag was executed, but the time when the event actually arrived on the KARTE side.local_date
: The date and time the tag was executeddate
: The time when the event actually arrived at KARTE
Detailed specifications
Event data sent by user tags or custom event tags is queued in the browser's localStorage as "event data waiting to be sent."
- Processing flow (example of sending a buy event)
- On the page
krt('send', 'buy', { revenue: 1000 })
Such tags are executed. - Event name (
buy
) and field information ({revenue: 1000}
) is temporarily saved in localStorage - When the transmission process is completed within the same PV
- Within the same PV, a buy event stored in localStorage is sent to KARTE, and the data temporarily stored in localStorage is deleted.
- If the transmission process is not completed within the same PV
- On the next PV, the buy event stored in localStorage is sent to KARTE, and the data temporarily stored in localStorage is deleted.
- On the page