This script is a convenient way to insert the default Google Analytics gtag script.
- It can be written in one line.
- It deletes itself after it has completed its task.
Replace <GTAG ID>
in the HTML script tag under "usage" with your gtag ID.
usage
<script data-gtag-id="<GTAG ID>" src="https://cdn.jsdelivr.net/npm/install-gtag" defer></script>