Why you shouldn’t add Analytics Code to theme?

Here’s the full article about this: https://wptavern.com/why-you-should-never-add-analytics-code-to-your-wordpress-theme

Here I will recap: It’s because you will switch theme constantly, or the theme will get updated. A theme is about displaying, not about functioning while the analytics or a custom code should be something persistent and stable, shouldn’t be interrupted by the theme.