How much main-thread time does Croct event tracking add per page?
I am profiling INP regressions caused by third-party tags. Our current trace shows long tasks attributed to two analytics vendors, and I want to know where Croct sits before we roll it out further.
The SDK auto-tracks events like pageOpened, userClicked, and userScrolled. In my profiler these handlers appear but the self time is too small to read reliably at my sampling interval.
Does anyone have actual numbers for what the tracking layer costs per page? And can auto-tracking be turned off entirely if I decide the budget only allows manual events
1 answer
The tracking layer is designed to stay well under any INP budget: Croct can track several events within 2 to 3 milliseconds. That is consistent with what you are seeing in the profiler, the handlers are there but their self time is close to the sampling noise floor.
On your second question, yes. Auto-tracking is controlled by the track option, which defaults to true:
croct.plug({ appId: 'YOUR_APP_ID', track: false,});With track: false nothing fires automatically. You only get the events you send yourself, so sessionStarted, pageOpened, pageLoaded, userClicked, userScrolled, slotPersonalized, and the rest of the auto events stop. Keep in mind that behavioral audience conditions depend on those events, so disabling them narrows what you can target on.
For context on where INP budgets actually go: experimentation snippets in the 60-400KB range evaluate their rules on the critical path, which is a different order of magnitude from event dispatch. The tracking calls themselves are not where the regressions you are hunting typically come from.