How should I use Web Analytics?

Now I get the js code:

<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "XXXXXXXXXXXXXXXX"}'></script>

But all of my sites reference an analysis.js file on the html:

<script src="/analytics.js"></script>

Then, how should I do if I want to add it to this js file?

So, I just like know how to take this code and put it into my js file to make it work.