Is it OK to add Google Tag codes onto Github Repository?

Stuff like API keys uploaded to Github Repository could cause some of the devastating problems, so I want to know if the Google Tag codes like( could also become a source of problems.

Example Google Tag code:

<--Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-xxxxxxxxxx"></script> <script> 
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);} gtag('js', new Date()) ;
gtag('config', 'G-xxxxxxxxxx') ;
</script>