How an agent audits tags
The agent opens one page on this site, reads the pushes, and checks whether consent held the hit. The trace is an example.
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want to see whether a tag waited for Accept. The agent only opens a page on this site.
How to use it
- Press Next from the open step to the answer.
- Compare the before-Accept and after-Accept notes.
- Open the dataLayer lab and the consent lab.
- Check that the event has a tool name only.
WalkthroughHow we built itShowHide
Example vendor setup is marked below. eVar and event numbers are examples. This lab does not call Adobe.
The tag audit lab replays a read of this site’s dataLayer lab before and after Accept. After Accept it queues tag_audit_tool with the tool name only. The lab does not call Adobe.
Show the example
The shared MCP view renders the request, the response, the timeline, and the answer. The trace is labeled as an example.
Stay read-only
Navigation and tools stay on this origin. There is no form submit and no write tool.
Queue the name only
After Accept, demonstrateEvent sends the lab event. When a tool ran, the only parameter is tool. The question text is not a parameter.
Skip the event before Accept
The Next button still moves the example when consent is off. demonstrateEvent returns without pushing.
From the code
After Accept, the step queues its event. A tool name is the only extra field.
function go(next: number) {
const target = steps[next]
if (!target) return
setIndex(next)
const eventName = target.event
if (granted && eventName) {
const tool = target.tool
demonstrateEvent(eventName, tool ? { tool } : {})Consent off still lets the example move. The event is skipped.
{granted ? null : (
<p className="mt-3 rounded-lg border px-3 py-2 text-sm">{tr(locale, "Accept measurement to record the step. The example still moves. Nothing is pushed before Accept.", "Acepta la medición para registrar el paso. El ejemplo igual avanza. No se envía nada antes de Aceptar.")}</p>Google and Adobe
Google queues tag_audit_tool after Accept. Adobe is an example of the same fields.
After Accept, this lab queues tag_audit_tool. When a tool ran, the parameter is tool and nothing else. The question and the answer text are not parameters. This site does not call gtag('set') or Adobe.
Simplified shape of the object queued after Accept. Register any new parameter as an event-scoped custom dimension. This site does not call gtag('set').
dataLayer.push({
event: "tag_audit_tool",
tool: "browser_evaluate",
})Example implementation. This site does not call Adobe. eVar121, prop121, and event121 are example variable numbers. In Launch, a data element reads the value and a rule sends it when the value changes. In the report suite, enable eVar121 with Most Recent allocation and expire it on the hit. A processing rule is unnecessary if the data element maps straight to that eVar.
Example alloy payload. _example is a placeholder schema, not a real tenant.
alloy("sendEvent", {
xdm: {
eventType: "web.webinteraction.linkClicks",
_example: {
mcpTool: "browser_evaluate",
},
},
})Example hit. eVar121 is hit-scoped in this example. prop121 dies at the same hit.
s.eVar121 = "browser_evaluate"
s.prop121 = "browser_evaluate"
s.events = "event121"
s.linkTrackVars = "eVar121,prop121,events"
s.linkTrackEvents = "event121"
s.tl(true, "o", "tag_audit_tool")Translation
Each lab field, the GA4 name, and the example Adobe variable. Scope is the part that usually gets lost in the translation.
Step
GA4. Event tag_audit_tool after Accept.
Adobe. Example event121. This site does not call Adobe.
Scope. Event. It records that the step was shown.
Tool name
GA4. Parameter tool. The arguments are not sent.
Adobe. Example eVar121, expire on the hit. This site does not call Adobe.
Scope. Event. A user property would keep the last tool.
Question text
GA4. Not sent.
Adobe. Do not put the question in a prop. Not sent.
Scope. It stays on the page.
Consent
GA4. Not a parameter. The push is skipped until Accept.
Adobe. Example: skip the hit while consent is off.
Scope. A gate on the hit.
Example audit
Accept measurement to record the step. The example still moves. Nothing is pushed before Accept.
Open
Example. The agent may open only a page on this origin. The dataLayer lab is the sample.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "browser_navigate", "arguments": { "url": "https://www.blackboxpersonalization.com/lab/datalayer" } }
}Response
Move forward to see this result.
Recommended next
Why these picksReading path transitions…