close #501 do not count attach iframe event in checkout

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 4e9e64cc5c
commit 36d52f8faf
3 changed files with 11 additions and 1 deletions

View File

@@ -157,6 +157,14 @@ function record<T = eventWithTime>(
lastFullSnapshotEvent = e;
incrementalSnapshotCount = 0;
} else if (e.type === EventType.IncrementalSnapshot) {
// attch iframe should be considered as full snapshot
if (
e.data.source === IncrementalSource.Mutation &&
e.data.isAttachIframe
) {
return;
}
incrementalSnapshotCount++;
const exceedCount =
checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;