Tracking with GA4 and Google Ads
Cookiemark sets up GA4 events and Google Ads conversions in your own Tag Manager container, from three questions. You see every change before it goes live, and it all stays in your container, where you or your agency can see and change it.
What tracking does
You answer three questions on the Tracking tab of a domain. Cookiemark turns your answers into tags, triggers and variables, and puts them in a workspace of their own in your container. You preview them in Tag Manager and publish when you are happy.
It counts the moments that make somebody a customer: a form that went through, a tap on a phone number, a WhatsApp message, a thank-you page, a purchase, or an event your site pushes to the dataLayer. Each moment goes to GA4 as an event. With a label, it also goes to Google Ads as a conversion.
Google Ads gets a conversion tag of its own for each conversion, so it credits the click with its own attribution.
Before you start
- A Google connection. An owner or admin connects the Google account that manages the container. Press Connect Google on the Tracking tab, on the Google and GTM tab, or under Settings, Integrations. We ask only for access to Tag Manager.
- A container that runs on your site. Choose it on the Google and GTM tab. The Tracking tab warns you when the last scan did not see that container on your site, because tags in it would never run.
- A GA4 measurement ID, a Google Ads conversion ID, or both. For Google Ads you also need a label for each conversion. The next section shows where to find them.
- A paid domain to put the tracking in Tag Manager. You can answer the questions on any plan. People at an agency client who may edit can fill in the answers, and the agency puts it in Tag Manager.
Does your site have no Tag Manager yet? Create a container at tagmanager.google.com and choose it on the Google and GTM tab. Enter its ID in the Container ID field there, and Cookiemark loads it on every page. Who loads the container explains the choice.
Finding your IDs
| What | Looks like | Where you find it |
|---|---|---|
| GA4 measurement ID | G-ABC123XYZ | In GA4 under Admin, Data streams. Open the stream of your site. |
| Google Ads conversion ID | 123456789 | In Google Ads under Goals, Conversions. Open a conversion and choose Tag setup, Use Google Tag Manager. |
| Google Ads conversion label | kq3XCJ7h0ZQbELi4 | On the same screen, below the conversion ID. Every conversion has a label of its own. |
You may paste the whole code from Google Ads, such as AW-123456789/kq3XCJ7h0ZQbELi4. Cookiemark splits it into the conversion ID and the label. When you paste a GA4 or Tag Manager ID where a Google Ads ID goes, the wizard tells you.
Cookiemark fills in the IDs it found already. It looks on your site during a scan, and in the tags of your container. A conversion ID kept in a constant variable is read through that variable.
The three questions
Open the domain, then Tracking, and press Start.
- What your site does. Choose a shop, a service business, an app or SaaS, or a site with content. What the scan points to is marked Detected. Your answer decides what the next question offers first. A shop with a contact form is a shop: forms and phone calls come up in the next question too.
- How people become a customer. Tick what counts. What Cookiemark saw on your site is ticked already, and each line says where it was seen. You can also count a thank-you page, or an event your site pushes to the dataLayer.
- Where you want to see it. Fill in your GA4 measurement ID, switch on Google Ads with its conversion ID, and add a label for each conversion. Here you also give a conversion its value, choose the currency, and switch on enhanced conversions.
Press See what we will do. The summary lists every conversion, when it counts and where it goes, with notes about tags that are in your container already. Press Put it in a workspace when it looks right.
A conversion without a Google Ads label goes to GA4 only. Its status on the Tracking tab is Label needed until you add the label and publish again.
Creating the conversions in Google Ads
Each conversion in Google Ads needs a conversion action of its own. Under every label field, the wizard shows the category, the count and the value setting to choose in Google Ads. Open How do I create a conversion and its label in Google Ads? in the wizard for the steps. Give the conversion action the same name as in Cookiemark, so you recognise it later.
How Cookiemark finds conversion moments
The wizard starts from what Cookiemark saw on your site. That comes from two places: the scan, and the visits of real people.
The scan
Every full or quick scan of your site looks at the things you might count: forms and the kind of fields in them, links to call, mail or WhatsApp, and booking and chat tools. It also notes the events in your dataLayer and the names of their keys, the Google IDs on the page, and links to sign up, log in or see prices.
To look again without waiting for the next scan, press Look for conversion moments on the Tracking tab. Cookiemark then visits up to ten pages of your site, which takes about a minute. This comes with paid domains.
Real visits
A scan cannot fill in your forms or click your buttons. On a paid domain with tracking, the Cookiemark script therefore reports the moments your visitors reach:
- a form that went through, or a form whose send button was pressed;
- a click on a phone number, an e-mail address or a WhatsApp link;
- a thank-you or order page that somebody landed on;
- an event pushed to the dataLayer, also by gtag.js.
This finds forms in a popup and pages the scan did not reach. In the wizard, such a line says Sent by visitors, Clicked by visitors or Seen during visits, with the date it was last seen.
What Cookiemark never reads
Cookiemark reports names and kinds only. It never reads what anybody typed, and never a value from the dataLayer: only the names of the keys. A form field is known by its kind, e-mail or phone, and by where it sits in the form. That is all a Google tag needs to find the field again for enhanced conversions.
The report sets no cookie, stores nothing in the browser and has no visitor ID, so it does not wait for the banner. Each moment goes out once per page at most. A moment the dashboard knows already goes out only now and then, to keep its date current. Visits by our own scanner are left out.
Forms
For more than 20 form tools, such as Contact Form 7, WPForms, Gravity Forms and Elementor, a form counts only once it went through. A click on the button with an error in the form does not count. The full list is under Form events.
For any other form, Cookiemark can only see that the send button was pressed, until a visitor sends it. A thank-you page counts more exactly, if the form has one. A newsletter form is offered but not ticked, because a sign-up is not a new customer.
When you publish tracking that counts forms, Cookiemark switches on Send form events on the Google and GTM tab. It publishes the domain for you when the domain is live.
What lands in Tag Manager
Everything goes into one workspace, called Cookiemark tracking, in the container you chose. Every tag, trigger and variable that Cookiemark makes has a name that starts with Cookiemark -, and a note that says Cookiemark manages it.
| Name in Tag Manager | What it is |
|---|---|
Cookiemark - Google tag and your GA4 ID | The Google tag for GA4, on Initialization - All Pages. Only when your container has no Google tag for that ID yet. |
Cookiemark - Conversion Linker | On All Pages, for Google Ads. Only when your container has no Conversion Linker yet. |
Cookiemark - GA4 - and the conversion name | A GA4 event tag for each conversion. |
Cookiemark - Ads - and the conversion name | A Google Ads conversion tag for each conversion with a label. |
Cookiemark - and the conversion name | The trigger of that conversion: an event, a click on a link, or a page view. |
Cookiemark - Google Ads conversion ID | A constant variable that holds your conversion ID. Every conversion tag uses it, so a new Google Ads account means one change. |
Cookiemark - DL - and a key | A dataLayer variable, for the form, a value, a currency or an order number. |
The conversion name with e-mail, phone or user data | The variables for enhanced conversions. |
The conversion name with amount or order number | The variables that read an order page. |
The GA4 events follow Google's recommended names where one fits: generate_lead for a form or a request, sign_up for a newsletter or a new account, and purchase for an order. A click sends click_phone, click_email or click_whatsapp. An event of your own keeps its own name. A form also sends its form_id.
Nothing goes live until you publish
- Put it in a workspace adds the changes to the workspace Cookiemark tracking. Google lets us make only a few requests a second, so this can take up to a minute.
- Preview in Tag Manager opens the workspace. Tag Manager's preview shows which tags fire on your site.
- Publish makes a new container version called Cookiemark tracking and puts it live. Cookiemark then starts a quick scan of your site to check the result.
Throw away deletes the workspace, and nothing changes in Tag Manager or on your site. To undo a publish, publish the version from before in Tag Manager under Versions.
Cookiemark changes only what it made itself. The tags, triggers and variables of anybody else stay as they are.
Nothing counts twice
A conversion that counts twice makes your campaigns look better than they are. Before it adds anything, Cookiemark reads your container and your site.
- Tags that measure already. The second question lists the tags in your container that measure something. A moment one of them counts is marked Already measured by, with the name of the tag, and is not ticked.
- The Google tag. When your container has a Google tag for your GA4 ID, Cookiemark uses it. When gtag.js loads GA4 on the page itself, outside Tag Manager, Cookiemark adds only the events, so page views do not count twice.
- Google Ads tags. A Google Ads tag with the same label stays, and Cookiemark adds no second one. The summary warns you about other Google Ads tags for the same account, so you can check what they count.
- Forms and thank-you pages. On a site that counts its forms, the thank-you page is off. Otherwise the same request would count twice.
- Purchases. The purchase event your shop pushes is used as it is. With an order number, Google counts each order once, even when somebody reloads the page.
Values and currency
A value tells GA4 and Google Ads what a conversion is worth. They add it up, and Google Ads can bid on it. There are three ways to give one.
- A fixed value. In the third question, under Conversion value, fill in what one conversion is worth to you on average, such as 50 for a quote request. Leave it empty to count without a value.
- From the dataLayer. A purchase event with the standard GA4 ecommerce data brings its own value, currency and order number. For an event of your own, choose the keys under Value, unique number or a condition.
- From an order page. When visitors land on a WooCommerce order page that shows the amount and the order number, Cookiemark reads both from that page.
Take a site that pushes this event when somebody asks for a quote:
dataLayer.push({
event: 'quote_requested',
quote: { value: 250, currency: 'EUR', id: 'Q-1042' }
});Count the event quote_requested, with the value from quote.value, the currency from quote.currency and the unique number from quote.id. With a unique number, the same request never counts twice. You can also count an event only when a variable has a certain value.
Choose the currency of your setup under Currency: EUR, USD, GBP, CHF, SEK, NOK, DKK, PLN or CZK. It applies to every value that does not bring a currency of its own.
In a shop, the steps towards the checkout, such as adding to the basket, go to GA4 only. They are steps on the way, not conversions.
Enhanced conversions
With enhanced conversions, Google Ads can credit more conversions to your ads.
Google's tag reads the e-mail address and phone number at the moment of the conversion, from the form or from the dataLayer. It sends them hashed, only when the visitor allowed marketing. Cookiemark never reads them itself: it all happens in the visitor's browser.
- E-mail addresses are trimmed and put in lower case, as Google asks.
- Phone numbers go in international form. For numbers typed without a country code, you choose the country, so 06 12345678 becomes +31612345678.
- A value that is a SHA-256 hash already goes as it is.
The switch shows in the third question when a conversion has an e-mail or phone field, or a dataLayer key that carries one. It works on Google Ads conversions with a label. After you publish, switch it on in Google Ads as well, under Goals, Settings, Enhanced conversions. Choose Google Tag Manager there and accept the terms. Without that, Google Ads ignores the fields.
Consent
Every tag Cookiemark adds is one of Google's own tag types, which have Consent Mode built in. They read what the visitor allowed in the banner, as Cookiemark tells Google. Cookiemark adds no extra consent settings to them.
Without consent the tags set no cookies. Where they run, they send Google a ping without cookies, and Google Ads uses those to estimate the conversions it cannot see. An extra consent check would stop those pings as well.
How much reaches Google before a choice depends on the mode you chose for Consent Mode. Basic or advanced explains the difference.
After you publish
Four things are left, and only you can do them, in your own Google accounts. The Tracking tab lists them after you publish.
- Mark the key events in GA4. In GA4 under Admin, Events, mark your conversion events as key events. GA4 shows a new event within a day.
- Switch on enhanced conversions in Google Ads, if you use them.
- Check the status in Google Ads. Under Goals, Conversions, each conversion should say Recording conversions within a few days. Inactive or No recent conversions means a label is wrong, or nothing was counted yet.
- Test it once yourself. Open your site, accept the cookies and send a form or tap a phone number. In GA4 under Reports, Realtime, the event shows up within a minute.
Changing or removing it later
Once tracking is set up, the Tracking tab shows Where your measurements go and a list of your conversions. Each conversion has a status: Live, Label needed or Not published.
- Change takes you to the IDs, labels, values and enhanced conversions. Fill in labels does the same when a label is missing.
- Add a conversion takes you back to the second question. Tick what you want to add, and untick what you want to stop counting.
- Then press See what we will do and put it in a workspace again. Cookiemark brings its own tags up to date and removes the ones it no longer needs.
Changes you make by hand to Cookiemark's own tags, triggers and variables are replaced the next time you publish tracking from Cookiemark. Make the change in Cookiemark instead, or build your own tag under another name.
To take all of it out, delete the tags, triggers and variables whose names start with Cookiemark - in Tag Manager, and publish. Every publish and every workspace you threw away stays listed under Changes in Google Tag Manager on the Tracking tab.
Questions
Does Cookiemark see what my visitors type?
No. Cookiemark knows a form field only by its kind and its place in the form. For enhanced conversions, Google's tag reads the field in the visitor's browser and sends it hashed to Google.
Why is a moment that Cookiemark saw not ticked?
A tag in your container may count it already, which the line then says. Newsletter forms, clicks on an e-mail address and product views are offered without a tick, because they rarely mean a new customer. Tick them if they do for you.
My site loads GA4 with gtag.js, not with Tag Manager. Does that work?
Yes. Cookiemark leaves gtag.js as it is and adds only the events, to the same measurement ID. The container still has to run on your site.
Can I see what Cookiemark made in Tag Manager?
Yes. Everything is in your own container, under names that start with Cookiemark -. You or your agency can open, preview and check every tag. See the Google Tag Manager page for how Cookiemark and Tag Manager work together.