Skip to main content
Glama

Set up conversion tracking

draft_conversion_tracking_setup

Set up conversion tracking from GA4 into Google Ads in one approved plan, returning a PREVIEW of only the missing steps.

Use it when the user wants their conversions (sign-ups, purchases, leads) tracked and used for bidding, or after audit_ga4_property or check_key_event_imports found a gap. It reads both products and plans what is missing, in order: link the GA4 property to the Google Ads account, mark the events as GA4 key events, turn on auto-tagging, import the conversion actions Google Ads created for the key events (they start hidden and record nothing), make them primary, and use their goal for bidding. Steps already in place are listed under already_done. Google Ads creates the conversion action for a newly linked property or new key event by itself, not instantly: such events come back as "After this" warnings, and running the tool again later imports them. NO_CHANGE when everything is set up. The website must send the events; this tool cannot add tracking code (see generate_tracking_code). Nothing changes until confirm_and_apply applies it: the dry run validates the Google Ads steps with validate_only and re-reads the GA4 ones, and every step skips itself if already done, so confirming again after a failed step continues where it stopped.

Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Google Ads API: https://developers.google.com/google-ads/api/docs/start

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "draft_conversion_tracking_setup"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventsNoGA4 event names to track as conversions, e.g. ["sign_up"], or objects {"event": "generate_lead", "counting_method": "ONCE_PER_SESSION"} (counting applies when the event is not a key event yet; default ONCE_PER_EVENT). Empty uses the property's key events that fired in the last 28 days.
primaryNoTrue (default) makes the imports primary conversions that Smart Bidding optimizes toward; False imports them as secondary (reported only).
customer_idNoGoogle Ads customer ID, digits with or without dashes. Defaults to the configured ads.customer_id.
property_idNoGA4 property as "properties/123456789" or the bare numeric ID. If empty, uses the default from config.
data_retentionNoOptional, e.g. 14: also lengthen GA4 event data retention (months). Only lengthens; empty leaves it.
ads_personalizationNoOnly for a new link. False (default) keeps personalized advertising off, so GA4 shares no audiences or remarketing data with Google Ads.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes far beyond the annotations: it discloses the dry-run/preview nature, that nothing changes until confirm_and_apply, that validate_only is used, that steps are idempotent and resume after failure, that new conversion actions start hidden, and that 'After this' warnings appear for newly created actions. This is rich behavioral context for a non-read-only, open-world tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded with the core purpose and preview behavior first, then sequencing and caveats. It is long but nearly every sentence carries operational meaning; minor tightening could improve it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description needn't explain return values, and it covers prerequisites (website must send events), sequencing, idempotency, and the apply handoff. Complete for a complex multi-step planning tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all six parameters thoroughly. The description adds little parameter-specific meaning beyond the schema, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Set up conversion tracking from GA4 into Google Ads in one approved plan, returning a PREVIEW of only the missing steps.' This clearly distinguishes it from siblings like draft_create_conversion_action or draft_key_event, which handle individual pieces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names when to use it ('when the user wants their conversions tracked and used for bidding, or after audit_ga4_property or check_key_event_imports found a gap') and points to the alternative for adding tracking code (generate_tracking_code). It also clarifies the confirm_and_apply handoff.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.