# Getting the most out of performance timing
> Documentation for Getting the most out of performance timing in the web tracker.
> Source: https://docs.snowplow.io/docs/sources/web-trackers/previous-versions/javascript-tracker-v2/advanced-usage/getting-the-most-out-of-performance-timing/
> Documentation index: https://docs.snowplow.io/llms.txt
> Status: Previous version
> Current version: https://docs.snowplow.io/docs/sources/web-trackers/

> **Info: Documentation for latest release**
>
> The documentation listed here is for Version 2 of the JavaScript Tracker. Version 3 is now available and upgrading is recommended.
>
> \- [Documentation for Version 3](/docs/sources/web-trackers/)
>
> \- [v2 to v3 Migration Guide](/docs/sources/web-trackers/migration-guides/v2-to-v3-migration-guide/)

The `domComplete`, `loadEventStart`, and `loadEventEnd` metrics in the NavigationTiming API are set to 0 until after every script on the page has finished executing, including sp.js. This means that the corresponding fields in the PerformanceTiming reported by the tracker will be 0. To get around this limitation, you can wrap all Snowplow code in a `setTimeout` call:

```javascript
setTimeout(function () {

 // Load Snowplow and call tracking methods here

}, 0);
```

This delays its execution until after those NavigationTiming fields are set.
