[Support Guide] Making analytics distinguish between deployed branches

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.

https://app.netlify.com/sites/{YOUR_SITE}/settings/deploys#snippet-injection

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

3 Likes

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.

Thanks!

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

1 Like

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

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