Google Analytics 4
Adds the Google Analytics 4 tag to every page. Visits by administrators aren’t counted.
Fill in your details first. Replace G-XXXXXXXXXX (twice) with your measurement ID from Google Analytics > Admin > Data streams.
<!-- Replace G-XXXXXXXXXX (twice) with your measurement ID. -->
<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>
Good to know
In the EU, load it only after consent: use your cookie banner, the Consent Mode snippet, or Snipfire Pro’s cookie consent setting.
Comes with a rule
It doesn't run for administrators, so your own visits don't count in your statistics. You can change the rule after installing.
In these packs
- Analytics and pixels: The usual tracking codes, ready to paste your ID into. Administrators’ visits aren’t counted.