Web Analytics tracking for custom SPA

We just deployed a new website for the SolidJS project at https://www.solidjs.com/. It’s a custom SPA with a custom built router and all that jazz. We have Web Analytics Pro enabled but I was wondering if SPA tracking against history is automatically done for us.

I’ve noticed there’s a beacon.js script that we can add and bind into our router. I can’t seem to find the right documentation or what is indeed the correct way to handle this. I found this documentation: https://developers.cloudflare.com/analytics/web-analytics/getting-started/web-analytics-spa

There are still two confusing details: where do I get my token and do I drop this into my codebase with spa false or true?

Thanks!