What every Google marketing setup actually needs

Before you write a single ad, you need four pieces working together. Skip any one of them and the algorithms behind Google's automation can't do their job. These four pieces are exactly what datafairy's first two steps put in place for you.

  1. A measurement tool that records what visitors do on your site — Google Analytics 4 (GA4). (Step 1 — signal from the site.)
  2. A way to install tracking on your site without re-deploying code every time something changes — Google Tag Manager (GTM). (Step 1.)
  3. A clear definition of a conversion — the events that actually represent revenue or pipeline for your business. (Step 2 — signal to the platforms.)
  4. A Google Ads account configured to optimize toward those conversions, so Smart Bidding can do its job. (Step 2, then Step 3 — running the marketing.)

From a website event to optimized ad spend — the three-step journey datafairy carries you through

1Organize data signals. Events placed and validated on your site — GA4, GTM, and the dataLayer firing correctly.
2Send signals to platforms. Those conversions flowing into Google Ads — conversion actions and Enhanced Conversions.
3Automate performance marketing. datafairy cold-starts and runs your advertising inside the caps you set.
Site event
trigger
dataLayer
step 1
GTM
step 1
GA4
step 1
Google Ads
step 2
Live ads
step 3

Google Ads is no longer a manual auction. Over 80% of paid-media spend on Google is now allocated by Smart Bidding — the algorithm decides which user, which moment, which placement, which bid. That decision is only as smart as the conversion data you give it. Set up the four pieces above correctly, and you give Smart Bidding clean signal. Set them up wrong, and you'll spend money training the algorithm on noise.

Why this order matters GA4 first, then GTM, then your conversion definitions, then Google Ads. People who skip ahead to Google Ads before measurement is firing end up paying for clicks they can't measure — and Smart Bidding can't optimize what it can't see. datafairy enforces this order on purpose: it won't run Step 3 until Steps 1 and 2 check out.

Install Google Analytics 4 (the right way)

GA4 is Google's measurement product. It records page views, button clicks, form submissions, and (for ecommerce) purchases. It's free, and it's the data layer that everything else — including Google Ads — leans on. This is the bedrock of Step 1.

Create your GA4 property

  1. Go to analytics.google.com and sign in with the Google account you want to own analytics.
  2. Click AdminCreate Property. Name it after your site or company, pick your time zone and currency.
  3. Add a Data Stream for your website. Enter your domain. GA4 will give you a Measurement ID that looks like G-XXXXXXXX. Save it — you'll need it in the next section.

Don't paste the snippet directly into your site

GA4 will offer you a "Google tag" snippet (gtag.js) to paste into your site's <head>. Don't. Or rather: don't if you're going to use Google Tag Manager (which you should). Pasting both creates duplicate page views, inflated session counts, and audience pools that double-count your visitors. We'll install the connection through GTM next.

Install Google Tag Manager (and only Tag Manager)

Google Tag Manager is a container — one piece of code on your site that lets you add, change, and remove every other tracking script without touching site code again. It's how you'll wire GA4 (and Google Ads, and Meta, and TikTok) into your site without filing a developer ticket every time.

Set up your GTM container

  1. Go to tagmanager.google.com, create an account, then create a Web container. You'll get a container ID like GTM-XXXXXXX.
  2. GTM will give you two snippets: one for your <head>, one for the top of <body>. Have your developer add both — or, if you're on a hosted platform, use its built-in integration:
    • Shopify — add your GTM container ID under Online Store → Preferences → Google Tag Manager (no theme edits needed). See Shopify's Google Tag Manager docs.
    • WordPress — install the Google Site Kit plugin or a dedicated GTM plugin (e.g. GTM4WP); paste your container ID in the plugin settings.
    • Webflow — paste the container ID under Site settings → Integrations → Google Tag Manager. See the Webflow University GTM lesson.

Wire GA4 into GTM

  1. In GTM, click TagsNewGoogle Tag. Paste your GA4 Measurement ID (the G-XXXXXXXX from the last section).
  2. Set the trigger to All Pages. Save.
  3. Click Submit at the top right and publish the container.

That's it. Your site is now sending page views to GA4 through GTM. No duplicate tracking, no developer involvement for future changes.

Why GTM, not gtag.js GTM lets a non-developer add and change tracking. The future versions of "I need to track scroll depth on the pricing page" or "Meta needs the Pixel installed" or "we want to test a new lead form event" become 5-minute changes in a UI, not 2-week engineering tickets. When datafairy stages a Step-1 fix for you, it stages it here — and you click publish.

Decide what counts as a conversion

This is where Step 2 — signal to the platforms — begins, and where most beginner setups go wrong. Not in the tooling, but in the definition. A conversion is an event that meaningfully represents money or pipeline. Smart Bidding will optimize toward it. Get it wrong, and the algorithm will optimize toward the wrong outcome.

For ecommerce

  • Primary conversion: purchase — fired on your order confirmation page, with the actual transaction value, currency, and item details.
  • Secondary signals: add_to_cart, begin_checkout — useful for funnel diagnostics, not for bidding optimization.

For lead generation / B2B

  • Primary conversion: a meaningful form submission — demo request, contact-sales, qualified lead. Not "newsletter signup."
  • Secondary signals: page views on key pages (pricing, product), video completion, gated content downloads.

For SaaS

  • Primary conversion: sign-up or trial start — fired on the post-signup confirmation page or via server-side event.
  • Long-term conversion: activated user, paid conversion. These often need to come back as offline conversion uploads (OCI) once the user converts in your product.

Implement the conversion event in GTM

Pick one. Let's say it's purchase for an ecommerce site. In GTM:

  1. Create a new tag: Google Analytics: GA4 Event.
  2. Set Event Name to purchase.
  3. Pass the required parameters: transaction_id, value, currency, items. These come from your site's dataLayer, which your developer needs to push when an order completes. (For Shopify and most ecommerce platforms, this is built in or one plugin away.)
  4. Set the trigger to fire on the order confirmation page (e.g., URL contains /thank-you or /order-confirmation).
  5. In GA4, mark the purchase event as a Key Event (formerly "conversion") in Admin → Key Events.

Connect Google Ads conversion tracking

Now hook Google Ads up to the same conversion event — getting the signal flowing to the platform that will spend your money. There are two ways. Use both.

Import GA4 conversions into Google Ads

  1. In Google Ads, go to Goals → Conversions → New conversion action → Import → Google Analytics 4 properties.
  2. Pick your GA4 property and select the purchase (or generate_lead) Key Event.
  3. Set this conversion as the primary action used for bidding.

This is the simplest path: GA4 captures the conversion, Google Ads imports it, Smart Bidding optimizes against it.

Add a Google Ads conversion tag in GTM (recommended for higher accuracy)

Importing from GA4 is great, but Google Ads' own native conversion tag fires faster and is less subject to GA4's data sampling. For your most important conversion, add a parallel Google Ads conversion tag in GTM:

  1. In Google Ads, create a website conversion action. Copy the Conversion ID and Conversion Label.
  2. In GTM, add a new tag: Google Ads Conversion Tracking. Paste both. Set the same trigger as your GA4 event.
  3. If it's a purchase, pass the transaction ID, value, and currency through.

Turn on Enhanced Conversions

Enhanced Conversions lets Google Ads use hashed first-party data (email address, phone) to recover conversions that get lost in the modern privacy stack — Safari ITP, ad blockers, opted-out tracking. It's a 5-minute switch, and it materially improves Smart Bidding accuracy. Don't skip it.

  1. In Google Ads → Conversions → click your conversion action → Settings → Turn on Enhanced Conversions.
  2. Choose Google Tag Manager as the implementation method. Map the user data fields (email, phone, name, address) to your dataLayer variables.
Hash PII before it hits the dataLayer

The dataLayer is a plain JavaScript array. It does not hash anything for you. Whatever you push to it — email, phone, full name — is readable by every other tag in your container (including any third-party script you've installed) and by anyone who opens DevTools and types window.dataLayer. The Google tag will SHA-256 the values on the way out to Google, but in the meantime the raw PII is sitting in plain text on the page.

Best practice: SHA-256 hash email and phone server-side before pushing them to the dataLayer (lowercased + trimmed for email; E.164 + digits-only for phone). Your Enhanced Conversions tag passes the hashes through unchanged, and no raw PII ever touches the browser.

Or skip the dataLayer entirely: use GTM's built-in User-Provided Data variable, which reads form fields directly at conversion time and hashes before sending. No raw PII at rest in the dataLayer, no extra developer work. Either approach is materially safer than pushing raw values and trusting one tag to hash them.

Test before you spend a dollar

Most failed Google Ads launches aren't ad failures. They're tracking failures that nobody caught before the budget started flowing. This is the gate between Step 2 and Step 3 — before you turn on a campaign, run this checklist:

  • In GTM, click Preview and walk through your site as a real user.
  • Confirm page_view fires once per page — not twice.
  • Walk through to a conversion. Confirm the conversion tag fires once.
  • In GA4, open Admin → DebugView. With Preview mode on, your test events should appear in real time.
  • Confirm the conversion event arrives with all required parameters (transaction_id, value, currency, items for ecommerce).
  • In Google Ads, wait a few hours, then check Goals → Conversions. Your test conversion should show status Recording conversions — not No recent conversions or Verification not complete.
  • Run a free datafairy scan on your site. It catches the duplicate page_view, missing parameters, and silent fails that DebugView and Preview mode let through — and tells you in plain English whether you're clear to spend.

If any of those checks fails, fix it before launching. A campaign on broken tracking is just an expensive way to burn budget. This is exactly why datafairy gates Step 3 behind a clean Steps 1–2.

The mistakes beginners make (and how datafairy catches them)

We've watched hundreds of new GA4 + GTM + Google Ads setups in the wild. The same handful of mistakes show up over and over:

  • Both GTM and gtag.js installed. The most common mistake. Doubles your sessions, inflates audiences, and Smart Bidding remarketing pools include phantom users who don't exist. datafairy flags this on the first scan.
  • Conversion event missing on the actual confirmation page. The tag is configured, but the trigger doesn't match the URL — or the order confirmation lives behind a redirect that strips parameters. Smart Bidding sees zero conversions and never optimizes. datafairy traces the event chain and tells you exactly where it broke.
  • Conversion fires but parameters are missing. The purchase event arrives, but with no value or currency. Smart Bidding can't do value-based bidding. ROAS reporting is unreliable. datafairy catches missing required parameters per platform.
  • Enhanced Conversions never turned on. A free 10-15% precision uplift on Smart Bidding, left on the table. datafairy checks and prompts you to turn it on.
  • Conversion firing twice. Both the GA4-imported conversion and the native Google Ads tag are firing, and they're double-counting. Smart Bidding thinks every purchase is two purchases. ROAS looks better than it is. datafairy pairs events to network hits and catches the duplicate.

None of these require an analytics consultant to find. They require an operator that knows what to look for, runs every time you change something, and then — once it's clean — takes the campaign live and keeps it tuned, within the caps you set.

From a blank setup to live, optimized ads.

Start free and datafairy scans your site in plain English. When you're ready, Starter stages the fixes and runs your advertising autonomously — within a spend cap you set.

Frequently asked questions

Do I need both Google Tag Manager and gtag.js?

No. Pick one. If you install both, you'll get duplicate page_view events, inflated session counts, and audience pools that double-count visitors. For most sites, GTM is the right choice because it lets you change tracking without re-deploying code.

How long does GA4 take to start showing data?

Real-time and DebugView show events within seconds. Standard reports in GA4 typically populate within 24–48 hours. Conversion data flowing into Google Ads can take up to 24 hours after the conversion fires.

Should I use Google's "Smart Bidding" right away?

Not on day one. Smart Bidding (Maximize Conversions, Target CPA, Target ROAS) needs at least 30 conversions in 30 days to optimize well — sometimes more for value-based strategies. Start on Manual CPC or Maximize Clicks while you accumulate conversion data, then switch to Smart Bidding once you have a reliable signal. (datafairy handles this cold-start sequencing for you in Step 3.)

What's the difference between a "conversion" and a "Key Event" in GA4?

Same thing, renamed. Google rebranded "conversions" in GA4 to "Key Events" in 2025. The Google Ads side still uses "conversion" as the term. Functionally identical.

Can a free tool tell me if my Google marketing setup is working?

Yes. datafairy is free to start, runs a live audit on any site you load, and gives you a plain-English summary of what's firing, what's missing, and what to fix. Built for marketers, not engineers.

What's the most common mistake beginners make?

Installing both gtag.js and GTM (causing duplicate events), defining "conversions" too loosely (everything is a conversion, so nothing is), and going live without testing in Preview mode.

What to read next