| Duration | ~55 min in the lesson + ~25 min homework |
| Prerequisites | Checkpoint lesson-7.3; a Google Ads account with a payment method |
| Checkpoint | lesson-7.4 |
What you will have
Google Ads has a lead conversion action fed by a GTM tag that fires on generate_lead, a conversion linker, enhanced conversions for leads switched on with hashed user data, and a link to the GA4 property.
Video
The video for this lesson is not recorded yet.
Prompts used in this lesson
Part 5 — Enhanced conversions for leads
Purpose: provide hashed lead contact data to GTM for Google Ads enhanced conversions for leads, without putting readable personal data in the data layer. Context: brightside-site at lesson-7.3. generate_lead is pushed after the server confirms the lead. The form already knows whether ad consent is granted (ad_consent from lesson 7.3). Read Google's help page "Configure Google Tag Manager for enhanced conversions for leads" and follow its section on code configuration with pre-hashed data: the exact key names, normalisation and encoding come from that page, not from memory. Do this: 1. When ad consent is granted, add to the generate_lead push an object with the SHA-256 hashed, normalised email and, if it can be put in E.164 format, the hashed phone, using the key names Google documents for pre-hashed values. 2. When ad consent is not granted, do not include the object at all. 3. Clear the object from the data layer after the push so it does not linger for later events. 4. Update docs/measurement-plan.md and note that these values are for the Google Ads tag only. Constraints: never push unhashed email, phone or name. No change to event names. Done when: the build passes; in the browser console you have confirmed the hashed object is present after a consented test lead and absent after a non-consented one; a unit test shows the hash of a known email equals an independently computed SHA-256. Report the evidence and quote the key names you used with the URL of the page you took them from.
Do along
Pause the video where told and do each step on your own project.
- After Part 2, pause: create your Google Ads account without a campaign; set time zone and currency carefully; add the payment method.
- After Part 3, pause: create the lead conversion action: category "Submit lead form", count one, value as decided.
- After Part 4, pause: in GTM add the Conversion Linker and Google Ads Conversion Tracking tags.
- After Part 5, pause: turn on enhanced conversions and accept the customer data terms after reading them. Run the prompt from Part 5, deploy, and add the variable and tag in GTM.
- After Part 6, pause: check auto-tagging; link Google Ads and GA4.
- After Part 7, pause: run the tagged test click, publish, and write the results into
docs/tracking-qa.md. - Commit and tag.
Check your work
- GTM Preview with
?gclid=TEST-7-4: Conversion Linker fired on landing; ongenerate_leadthe conversion tag fired once with your Conversion ID, label and a transaction ID. - Network tab: a request to Google's conversion endpoint, and the form-data request with a hashed
em. - Consent rejected: no hashed object in the data layer; the user-provided data tag sends nothing.
- CRM: the test lead shows gclid
TEST-7-4. - Google Ads: the conversion action leaves "Unverified" within a day. Expected for now: "No recent conversions".
Common problems
- Status stays "Unverified" → the container was not published, or the Conversion ID or label has a typo. Compare character by character.
- Conversion tag fires twice → two triggers attached, or an imported GA4 event is also primary. Keep one.
- Sign-up forced a campaign → pause it immediately and confirm no spend on the billing page.
- No
gclidon real clicks later → auto-tagging is off, or a redirect on your site strips parameters. Ask Claude to test that/?gclid=xsurvives any redirect.
Homework
About 25 minutes, on your own; the first task waits until the next day. No later lesson depends on it, and it creates no campaign.
- Day-after status. Tomorrow, read the conversion action's status in Google Ads, and check that the Google Ads link is listed in GA4's Admin. Deliverable: a dated line in
docs/tracking-qa.mdwith both. Done when: the status is no longer "Unverified", or you have noted which Common problems entry you are following. - One lead, three platforms. Open your GTM container and fill in a table with a row each for GA4, Meta and Google Ads, and these columns: tag name, trigger, the ID that prevents double counting (or "none"), consent required. Deliverable: the table in
docs/measurement-plan.md. Done when: every cell comes from what you see in GTM, not from memory, and all three rows name the same trigger. - Does the click identifier survive? Open your site four ways with
?gclid=TEST-HWon the end: with and withoutwww, withhttp://and withhttps://. Do not submit a lead. Deliverable: four lines indocs/tracking-qa.md: the address you typed, the address shown after loading, and whether the parameter was kept. Done when: all four are recorded; for any "no", Common problems says what to ask Claude.
If a task changed files in the project, commit and push without a tag: git add -A, git commit -m "Homework 7.4", git push.
Save your work
git add -A
git commit -m "Lesson 7.4: Google Ads conversion tracking and enhanced conversions for leads"
git tag lesson-7.4
git push
git push --tags