# Rocket Loader and script combiners

Some tools that delay or bundle scripts stop the tracker from finding itself. One extra attribute fixes it.

Source: https://crustat.com/docs/tracking/rocket-loader

## The problem

When the Crustat script starts, it looks at its own `<script>` tag on your page. That tag tells it two things: your site ID (the `data-site` part) and where to send visits. The browser hands this over through something called `document.currentScript`.

Some speed tools rewrite, delay or bundle scripts before the browser runs them. Cloudflare's Rocket Loader is the most common one. Some caching plugins and site builders do the same. After that, `document.currentScript` can come back empty. The script then has no site ID and no address, so it sends nothing at all.

## The fix

Add `data-cfasync="false"` to your tracking line. Copy the line from **Site settings → Install** in Crustat, then add the attribute yourself (the copied line doesn't include it):

```html
<script defer data-cfasync="false" src="https://stats.crustat.com/script.js" data-site="YOUR-SITE-ID"></script>
```

Keep your own site ID in place of `YOUR-SITE-ID`. The attribute tells Rocket Loader to leave this one script alone. It changes nothing else.

## Other script combiners

If you use a caching or speed plugin that combines, minifies or delays JavaScript, look in its settings for a list of scripts to exclude. Add the Crustat script by its address:

```
stats.crustat.com/script.js
```

Some of these plugins also respect `data-cfasync="false"`, so adding it to the line does no harm either way.

## How to tell if this is your problem

It's the likely cause when all of these are true:

- the tracking line is in your page's source,
- you're not on `localhost`,
- you haven't turned on [Ignore my visits on this browser](https://crustat.com/docs/tracking/ignore-your-visits),
- and still nothing shows up after a minute.

Check your Cloudflare dashboard for Rocket Loader (under **Speed**), or your builder's or plugin's performance settings for anything that combines, minifies or delays JavaScript. Once the script is excluded, visit your site again and give it another minute.

For the full checklist, see [Visits aren't showing up](https://crustat.com/docs/getting-started/troubleshooting).
