Google Ads tag
Adds the Google Ads (gtag.js) tag to every page, for conversion tracking and remarketing. Visits by administrators aren’t counted.
Before you switch it on: Replace AW-XXXXXXXXX (twice) with your conversion ID from Google Ads > Tools > Tag setup.
It arrives switched off, even when you install its whole pack with "Switch on after installing".
<!-- Google Ads -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push( arguments ); }
gtag( 'js', new Date() );
gtag( 'config', 'AW-XXXXXXXXX' );
</script>
Good to know
If Google Analytics 4 is already on the page, you only need the gtag( 'config', 'AW-…' ) line. In the EU, load it after consent.
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
- More tracking codes: Google Ads, TikTok, LinkedIn, Pinterest, Hotjar, Plausible, site verification and a GA4 purchase event.