Skip to content
Faisal Mahmud TusherDigital marketing, SEO & analytics
with Faisal Tusher

Checklists

AI-Written Code Review Checklist

A review checklist for tracking code, spreadsheet formulas, SQL and structured data an AI tool wrote: definitions first, no customer data, tests and records.
Checklistintermediate10 min readUpdated

When to run this checklist

Run it before tracking code, a spreadsheet formula, a calculated field, a query or structured data markup that an AI tool wrote is published, shared or used in a report. The first group belongs before the request goes to the model, so the best time to open the list is when the work is first scoped, not when the output is already in a workspace. The later groups run once the output is back and before anyone relies on it. Run it again whenever a saved prompt is reused for a new event, metric, question or template, because the definition and the data change even when the prompt does not.

The person who ticks it is whoever asked for the output and will answer for it: an analyst, a marketing operations lead, a developer or a search specialist, with a second person who can read the work for the release lines. Four tutorials own the method, one per kind of output: tracking code, spreadsheet formulas and calculated fields, SQL and structured data. They agree on the same layer of checks, which is why one list serves all four. Where a line names one kind of output, it applies only when that kind is in front of you.

Neighbouring lists take the cases this one does not. Articles, ad copy, emails and images an AI tool drafted go through the AI-assisted content review checklist. Every container version, whoever wrote the change, goes through the GTM container publish checklist, and the proof that a live action reaches every system that should receive it belongs to the tracking verification checklist. A formula or field that feeds a shared dashboard meets the dashboard launch QA checklist next, and markup released on a new page meets the SEO page publishing checklist.

Before you start

  • The written definition: the tracking plan row, the metric's definition, the question for the query or the documented type for the markup. The measurement plan is where the business question behind each event or metric is written down.
  • The organisation's AI use policy, with the list of approved tools and what data may go into them.
  • The schema, column names or template fields the output will read, with invented sample rows or values.
  • An independent figure to reconcile against: a platform total, a finance figure or a catalogue record.
  • The lists of test cases: pages that should and should not match, awkward rows, a key that is deliberately absent.
  • The release rules for the container, the reporting tool or the site, and the name of the person who reviews.
  • The place where verified versions are kept, beside the tracking plan or in the team's library of checked work.

The checklist

The groups follow the order of the work: prepare the request, read what came back, test it, then release and record it. A line in the first three groups that cannot be ticked stops the output from shipping or reaching a report; the release group can be finished on the day, but not skipped.

0/22

Before asking

Reading what came back

Testing

Release and record

Where each check is explained

The widget keeps the lines short so they can be ticked; the reasoning lives in the guides. Each check links to the page that explains it, and the other checking tutorials make the same point for their own kind of output.

CheckExplained in
Approved tool for the workWriting an AI use policy
Definition or plan row written firstChecking AI-written formulas
Field names and invented rows, no customer dataMinimising data before prompting
Markup from template fields, not per pageChecking AI-generated structured data
Output read against the definitionChecking AI-written tracking code
Event and parameter names match the planChecking AI-written tracking code
Properties checked against the type's documentationChecking AI-generated structured data
Markup for unseen content removedChecking AI-generated structured data
Personal data the code could sendChecking AI-written tracking code
Patterns tested on matching and non-matching pagesChecking AI-written tracking code
Preview with consent granted and refusedChecking AI-written tracking code
Ranges and lookups cover every rowChecking AI-written formulas
Blanks, zeros, text and errorsChecking AI-written formulas
Joins checked for duplicated rowsChecking AI-written SQL
Grain and date boundaries match the questionChecking AI-written SQL
Hand recomputation and reconciliationChecking AI-written formulas
Sample pages rendered and validatedChecking AI-generated structured data
Published through the container's rulesTag Manager container governance
Verified version saved with its definitionChecking AI-written SQL
Change and prompt recordedChecking AI-written tracking code
Enhancement reports watchedChecking AI-generated structured data
Saved prompt re-tested after a model changeTesting prompts and models

If an item fails

The first group is the hard stop. Output from a tool the organisation has not approved, or from a prompt that carried customer records, does not ship however good it looks, because the problem has already happened and needs handling under the AI use policy rather than a quick fix to the code. Work asked for without a written definition goes back to the definition: write it, then read the output against it, and expect to ask again. The data minimisation tutorial shows how to prepare field names and invented rows, which is all the model needs, and describes data protection at the level of the regulation and regulator guidance it cites, as general direction rather than legal advice.

In the reading and testing groups, a failed line sends the output back, not forward. An event name or Event Parameter the tracking plan does not hold is removed or proposed as a change to the plan, never shipped by default. A value whose source can carry Personal Data comes out; the tracking code tutorial records the data layer rule that personal data does not belong in the Data Layer, and Google's preview tools are where both consent states are tested. A query whose total does not reconcile to the independent figure has a step wrong somewhere; the SQL and formula tutorials both say to go back to the checks rather than adjust the result, and a statement of the table grain of each step is usually where the error shows. A structured data property Google does not document for the type, or one describing content the page does not show, comes out of the mapping; the structured data tutorial follows Google's general guidelines that Schema Markup must describe the visible page.

The release group can often be finished the same day, but it is not optional. Tracking changes go through the container's review and the GTM container publish checklist, whoever or whatever wrote them. A formula or query with no saved definition and no note of what it was reconciled against will be rebuilt, slightly differently, by the next request to a model, which is how a team ends up with two versions of the same figure and no Source of Truth. The testing prompts and models guide uses the NIST AI Risk Management Framework for the last line: a saved prompt passed on one model at one point in time, and a vendor's model change means re-running the stored tests before the prompt is trusted again. The academy checkpoint on proving AI-written technical work tests judgement across these groups through scenarios at a group of veterinary practices, from a booking tag that sends an owner's phone number to practice markup claiming a star rating no visitor can see.

A plant nursery checks three pieces of AI-written work (illustrative)

Illustrative example — not a real result

Three outputs, three catches, all before release

Vaxlumbe Nursery, an invented online plant nursery that also books places on potting workshops, asks an approved AI tool for three things in the same week: a tag for a confirmed workshop booking, a spreadsheet formula for the share of customers who order again within 90 days, and product markup for its 340 plant pages. The operations lead runs this list for each, with the web developer as second reader.

The tag request starts from the tracking plan row, which names the event workshop_booked with 3 parameters. The model returns a push with a fourth parameter, customer_email, filled from the booking form. Reading the output against the plan catches it, the parameter is removed, and preview with consent refused confirms the tag holds back.

The formula is written from a definition and 12 invented rows. It returns 31% on the sheet, which looks plausible, but checking the ranges shows they stop at row 13, the last sample row, so every order added since is left out. With whole-column references the figure is 24%, and a hand count of one month's 58 customers matches the formula exactly.

The markup mapping includes an aggregateRating property, but only 40 of the 340 pages show reviews. The check against the visible page removes it from the other 300, the template writes it only where reviews show, and a rendered sample of 6 pages passes validation. All three are saved with their definitions, and the prompts are recorded beside the tracking plan for the next request.

Common mistakes

  • Asking before defining. Without the plan row, the metric's definition or the documented type in the request, the model supplies its own, and the output is checked against nothing.
  • Pasting real data because it was quicker. Field names and invented rows give the model everything it needs; customer records do not belong in a prompt.
  • Treating "it runs" as "it is right". A tag that fires, a formula that returns a number and a query that completes have each passed only the first and weakest test.
  • Testing only the case that should work. Over-matching triggers, blank rows and missing keys are found by testing the cases that should not match or should return nothing.
  • Trusting the model's explanation of its own output. The explanation can describe the code the model meant to write; read the code, not the summary.
  • Skipping the review because the code arrived quickly. Generated changes go through the same release rules as any other, and a second reader is part of the Human Review the tutorials assume.
  • Not saving the verified version. The next request starts from scratch and makes the same mistakes again.

The checklists library holds the lists that sit beside this one, from AI-assisted content review to container publishing.

Frequently asked questions

Which kinds of AI-written work does this checklist cover?

Anything technical a model wrote that will run, calculate or describe something on the business's behalf: a data layer push, a tag, a trigger or a regular expression for the tag manager; a spreadsheet formula or a calculated field in a reporting tool; a query against a warehouse or an export; and structured data markup for a page template. Articles, ad copy, emails and images an AI tool drafted go through the AI-assisted content review checklist instead.

The code runs without an error and the number looks right. Why check further?

Because the failures that matter in generated technical work are quiet. A tag that fires can still send a parameter the tracking plan never defined, a formula can return a plausible figure while its range stops short of the newest rows, a query can run cleanly while a join repeats rows, and markup can pass a syntax check while claiming a rating the page never shows. Running without an error proves only that the code is valid, not that it answers the question the business asked.

Do we need to run every line for a one-off formula or query?

Run every line that applies to the kind of work in front of you; the lines about triggers, consent and markup do not apply to a spreadsheet formula, and the lines about joins do not apply to a tag. The lines that apply to every kind of output are the ones in the first and last groups: an approved tool, a written definition, no customer data in the prompt, a reading against the definition, and a saved version with a note of what it was checked against. A one-off number that reaches a report is used as if it were permanent, so it deserves the same proof.

Terms used on this page

Frameworks

Where this page is used

Part of these learning paths

Also related

Sources

  1. Preview and debug containers — Google Tag Manager Help
  2. The data layer — Google Tag Platform
  3. [GA4] About events — Google Analytics Help
  4. General structured data guidelines — Google Search Central
  5. AI Risk Management Framework — NIST

Related