★ 5.0 on Google · No long contracts · You own every asset
Rathly

What is the Google tag (gtag), and what does it do?

Short answer

The Google tag, also called gtag.js, is a piece of code on your website that sends data to Google Ads and Google Analytics. It records visits and conversions and builds remarketing lists. One Google tag can serve several Google products. You can install it in your site's code or through Google Tag Manager.

In this answer
  1. 01What the tag does
  2. 02Tag IDs
  3. 03gtag.js vs Google Tag Manager
  4. 04Keep the site fast

What the tag does

JobWhat it means for you
Page viewsRecords visits for Analytics
ConversionsReports calls, forms and sales to Google Ads
Click IDsSaves ad click details for later matching
AudiencesAdds visitors to remarketing lists
Enhanced conversionsSends hashed form data to improve matching

Tag IDs

Each Google product has its own ID. Google Ads IDs start with "AW-," and Google Analytics IDs start with "G-." One Google tag on the page can send data to both. That avoids loading two separate scripts.

gtag.js vs Google Tag Manager

Two ways to install it
gtag.js in code
  • Code added to the site directly
  • Fewer moving parts
  • Changes need a developer
  • Good for simple sites
Google Tag Manager
  • Tags managed in a web interface
  • Another layer to maintain
  • Changes without code releases
  • Good for many tags

Keep the site fast

Every script adds load time. Install the tag once, avoid duplicates from plugins and themes and remove tags for tools you no longer use. Respect consent rules where your visitors live.

Good example. A law firm's site loads one Google tag that sends data to both Ads and Analytics. Conversions match across both tools.

Bad example. A law firm's site loads the tag three times, from a plugin, the theme and a manual snippet. Every form counts three times.

Read what Google Tag Manager is. Our PPC management checks tags before every launch.

Keep reading

Related answers

All PPC questions →

Your agency isn't delivering? Talk to us.

  • ✓ You talk to the people who do the work
  • ✓ We handle 95% of requests the same or next day
  • ✓ You own every account, site and listing
Talk to usSTEP 1 OF 2
What isn't working?
No contract. Cloudflare Turnstile blocks spam.
Call usTalk to us →