I have an HTML code that has only one line of code:
<script async src="https://www.googletagmanager.com/gtag/js?id=ID"></script>
But I do not want to use HTML at all. Since I am performing all my functions inside my javascript, can I add the above code inside my JavaScript? If so, how?
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'ID');