SEO & Analytics 8 min read

How to add Google Analytics & Ads tags to your site

Google tags let you measure traffic, understand your visitors, and run ads. Here's what they are, how to get yours, and how to ask Ullbek to add them to every page — then verify they're firing.

Once your site is live, one of the first things most people want to do is connect it to Google. Whether that's Google Analytics (so you can see who's visiting), Google Ads (so your ad campaigns can track conversions), or both — all of it runs through a small snippet of code called a Google tag.

The good news: you don't need to touch any code yourself. You just paste your tag snippet into the Ullbek chat, and the agent adds it to every page of your site automatically.

What is a Google tag?

A Google tag is a short piece of JavaScript that you place on every page of your website. It acts as a bridge between your site and Google's tools. Once installed, it silently sends data — page views, button clicks, form submissions, purchases — to whichever Google product you've connected it to.

Every tag has a unique Measurement ID (or Tag ID) that ties the data to your specific Google account. It looks like this:

Tag ID formats
G-XXXXXXXXXX
Google Analytics 4 (GA4) — tracks page views, sessions, user behaviour, and custom events on your site.
AW-XXXXXXXXX
Google Ads — used for conversion tracking, so your ad campaigns know which clicks led to a sale, sign-up, or enquiry.
GT-XXXXXXXXX
Google Tag Manager — a container tag that manages multiple tags without touching site code for every change.

The tag snippet itself is just a few lines. Google provides it to you — all you need to do is get it onto every page of your site, which is exactly where Ullbek comes in.

Step 1 — Get your tag from Google

Before you can add anything, you need to set up the relevant Google product and get your tag snippet. Here's where to find it for each tool:

Google Analytics 4

  1. Go to analytics.google.com and sign in.
  2. If you haven't already, create a new Property for your website.
  3. In the left sidebar go to Admin → Data Streams → your stream → View tag instructions.
  4. You'll see a snippet starting with <!-- Google tag (gtag.js) -->. Copy the whole thing.

Google Ads (conversion tracking)

  1. Go to ads.google.com and sign in.
  2. Click Goals → Conversions → Summary → New conversion action.
  3. Choose Website, set up your conversion, then on the final screen choose "Use Google tag".
  4. Copy the snippet — it'll start with the same <!-- Google tag --> comment and contain your AW- ID.
Already have both?

You don't need to add two separate script tags. One gtag.js script handles everything — just tell Ullbek both IDs and it'll configure them together efficiently.

Step 2 — Paste your tag into the Ullbek chat

This is the easy part. Open your Ullbek project and paste your tag snippet directly into the chat. You can either paste the full snippet Google gives you, or just share the ID — either works.

Example message to Ullbek
Can you add this Google Analytics tag to my site?

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>...
  gtag('config', 'G-XXXXXXXXXX');
</script>

Ullbek will add the tag to the <head> of every HTML page on your site. If you already have a Google tag installed, it'll add your new ID to the existing script rather than loading a duplicate — which is the correct, efficient way to handle multiple Google products.

All pages, at once

Ullbek adds the tag to every page simultaneously — homepage, blog posts, docs, legal pages, everything. You don't need to mention each page individually.

Step 3 — Verify the tag is firing

Once Ullbek confirms it's done, it's worth double-checking that the tag is actually working. There are two ways to do this — one you can ask Ullbek to do, and one you do yourself in Google.

Ask Ullbek to check

The simplest option — just ask:

Example message to Ullbek
Can you check if the Google tag is firing on this page?

Ullbek will inspect the browser's data layer in real time and tell you whether the tag loaded, which IDs fired, and confirm the order everything ran in. It's the fastest way to get a definitive answer.

Check with Google Tag Assistant

Google's own tool, Tag Assistant, lets you verify tags from inside Chrome:

  1. Install Tag Assistant

    Add the Tag Assistant Chrome extension from the Chrome Web Store (free, made by Google).

  2. Navigate to your site

    Open your published Ullbek site in Chrome and click the Tag Assistant icon in your toolbar.

  3. Enable recording

    Click Enable in the Tag Assistant panel, then refresh the page. It will scan for all Google tags running on the page.

  4. Check the status

    You'll see a list of detected tags. A green icon means the tag is firing correctly. Blue means it fired with minor notes. Red means something's wrong — paste the error into the Ullbek chat and it'll fix it.

Check with Google Analytics Realtime

If you added a GA4 tag, the simplest end-to-end check is to open Google Analytics → Reports → Realtime. Then open your site in another tab and navigate around. You should see yourself appear in the Realtime report within about 30 seconds.

Preview vs. published site

The tag fires in the Ullbek preview environment but Google Analytics Realtime may filter out local/internal traffic. For a clean check, test on your published site URL (e.g. yoursite.ullbek.com).

Adding multiple tags

If you need both Google Analytics and Google Ads on the same site, you only need one gtag.js script — it can carry multiple configurations. The cleanest approach is to tell Ullbek both IDs in one message:

Example message to Ullbek
Please add both of these Google tags to every page:

— Google Analytics: G-XXXXXXXXXX
— Google Ads: AW-XXXXXXXXX

Ullbek will load the script once using the GA4 ID as the primary, then add a second gtag('config', ...) call for the Ads ID. This is exactly how Google recommends it — no redundant script loads, no conflicts.

Common questions

Will this slow down my site?

The tag script loads with async, which means it doesn't block the rest of your page from rendering. The performance impact is negligible on modern connections.

Do I need to re-add it if I create a new page?

No. Whenever Ullbek creates a new page on your site, it follows the same template as your existing pages — including the Google tag in the <head>. New pages are covered automatically.

I don't see data in Google Analytics yet — is something wrong?

Standard reports in Google Analytics have a 24–48 hour processing delay. Use Realtime for an immediate check. Also make sure you're looking at your published site, not the Ullbek builder preview.

Can I add Google Tag Manager instead?

Yes — just paste your GTM snippet into the Ullbek chat exactly as you would a GA4 or Ads tag. GTM uses a slightly different format (both a <script> and a <noscript> snippet), and Ullbek will add both in the right places.

"You don't need to touch any code. Paste the snippet into the chat and Ullbek handles the rest — every page, at once."

That's everything you need to get Google's measurement tools running on your site. If you run into anything unexpected, just describe it in the chat — Ullbek can inspect the tag in real time and fix any issues on the spot.

Up next

How to create a website with AI →
← All docs