[Support Guide] Making analytics distinguish between deployed branches

Last Reviewed by Netlify Support May 2024

Especially useful if you are running split tests, or want to be sure that you are only viewing analytics data related to you production branch, with Snippet Injection, you can modify the analytics code injected into each page of your site.

Snippet injection is configurable in your site’s deploy settings and give access to environment variable including things like the active branch for that build.


The video below (~5 mins) walks through setting this up.


Hello @philhawksworth

Thanks for the great videos you provide!

Do you have an idea on how to use netlify’s internal analytics tool to get data on the split tests?
Can’t seem to figure this one out.


I don’t think it’s possible at present. I’ve gotten a feature request filed for us!


That’s a great question!
Happy to see @fool submitting a feature request for that.

(and thanks for the kind words, @blackforestboi!)