Suggested improvements to multi-lingual document data and management

Hey @peter2,

I know there are a lot of great options out there for analytics, like Netlify Analytics and Simple Analytics. I only have experience with Google Analytics, which is what we use on the Prismic Docs. It's free and very powerful, including data like user navigation, time on page, session duration. If you combine it with Google Tag Manager, you can program more advanced reporting, like whether a user scrolled to the bottom of a page.

For mutli-lang with React, the most important part is how you construct your API query. In your repository, you can have parallel translations of your content in multiple languages. Then, when you query the API, you simply the language you want (en-us, fr-fr, etc). Often, this would be based on the route (/en-us/hello-world). But you could also do it in the state of your app. Here are the docs for querying by language:

Also, here's how another user did it:

Let me know if you have any other questions.

Sam