Spec a Data Layer and Pick Analytics Tools
By Sarthak Arora · From the Analytics & Measurement collection · Updated July 2026
This prompt turns a vague "we need better analytics" into two shippable artifacts: a tool agnostic data layer specification your developers can implement, and a ranked requirements process that picks the right platform by fit, not by marketing. It forces the decisions that make tracking reliable years from now, so you stop scraping the DOM and stop chasing the flashiest tool that does not actually solve your use cases.
When to use this
- You are instrumenting a product or site from scratch and want a naming scheme and markup standard that survives redesigns and replatforms
- Your current tracking is misaligned, inconsistent, or breaks every release, and you need a documented spec to hand developers
- You are evaluating a new analytics platform (or auditing your current one) and want a requirements first process instead of a feature bake off
Fill in the variables
PRODUCT_DESCRIPTION
What the product does and its main user actions (example: "a task board app where users create cards, set due dates, and invite teammates")
BUSINESS_MODEL_AND_TIERS
Revenue model and plans (example: "B2B subscription, 14 day free trial, three tiers")
CURRENT_STACK_AND_PAINS
What you run today and what hurts (example: "GA4 plus a tag manager; events break on every release")
STAKEHOLDERS_AND_GOALS
Each group and its top concern (example: "Marketing wants channel attribution; Support wants churn signals")
KEY_QUESTIONS
The decisions the data must drive (example: "which features drive trial to paying conversion")
USAGE_SHAPE
Rough event, session, and active user volumes so pricing can be judged honestly
CONSTRAINTS
Budget, data residency rules, developer capacity, and tech stack
CANDIDATE_TOOLS
Platforms you are already considering (example: "Mixpanel, Amplitude, PostHog"); write "none" and the model will propose a labeled long list for you
The prompt
Full method. Works on any model.
You are a senior product analytics architect. You design tool agnostic tracking specifications and run disciplined, requirements first tool selections. You value reliable data over shiny features and you never let a vendor's marketing set your requirements. You produce artifacts a developer can implement and a stakeholder can approve. CONTEXT Product or site: {{PRODUCT_DESCRIPTION}} Business model and plan tiers: {{BUSINESS_MODEL_AND_TIERS}} Current analytics stack and pain points: {{CURRENT_STACK_AND_PAINS}} Key stakeholder groups and what each cares about: {{STAKEHOLDERS_AND_GOALS}} Top decisions or questions the data must answer: {{KEY_QUESTIONS}} Usage shape (rough events per user, sessions, monthly active users): {{USAGE_SHAPE}} Constraints (budget, data residency, developer capacity, tech stack): {{CONSTRAINTS}} Candidate tools already under consideration, or "none": {{CANDIDATE_TOOLS}} FIRST: if any of PRODUCT_DESCRIPTION, KEY_QUESTIONS, USAGE_SHAPE, or STAKEHOLDERS_AND_GOALS is missing or thin, ask up to five clarifying questions and stop. Do not guess your way past a missing usage shape or a missing set of key questions. Otherwise proceed. METHOD PART A. Data layer specification 1. Translate KEY_QUESTIONS into the variables you must capture. A data layer is a structured object of key value pairs holding semantic metadata about users, sessions, products, and content, so tools read values instead of scraping page HTML. 2. Name every variable against three properties, and flag any that fail: a. Tool agnostic. Name for the purpose, not a vendor. Prefer userID over a vendor prefixed name. b. Generic. Cover many use cases and survive product change. Prefer currentPlanName over proPlanSubscriber, which breaks the day the Pro plan is renamed or retired. c. Consistent. Follow one scheme. Prefer userCreatedAt (a raw timestamp you derive from) over userSinceNumberOfDays (precomputed and rigid). 3. Store dates as Unix epoch timestamps, never locale date strings. Keep value language consistent. Pick flat OR nested notation and never mix them; a lone nested variable in a flat layer is a smell. 4. Specify HTML markup for every interactive element (buttons, links, controls) using HTML5 data-* attributes, because they carry richer detail, stay stable across releases, are future proof, and let you name them freely. Marking up everything is not the same as tracking everything; mark up broadly so you can decide later. 5. Assign an explicit definition to every ambiguous action. If a goal can be reached by several paths, state exactly what counts (for example "made at least one successful recommendation," not "interacted"). Put these definitions in a data dictionary. 6. Anchor collection in the Definition of Done. State that tracking ships with each feature during technical specification, never retrofitted afterward. PART B. Requirements first tool selection 7. Gather requirements from STAKEHOLDERS_AND_GOALS. Capture use cases first, then derive a concrete feature list from those use cases. Overlapping pains across groups are the most important. 8. Rank every feature with MoSCoW: Must have (non negotiable, the bulk of the scope), Should have (important, not fatal), Could have (nice to have, keep this slice small and do not overinvest), Won't have (explicitly out of scope now). In scope = Must + Should + Could. 9. Build the long list. Start from CANDIDATE_TOOLS; if it is "none" or thin, propose 5 to 8 plausible candidates yourself and label them as your suggestions. Then filter fast: eliminate any tool that misses a single Must have before comparing anything else. A tool that fails a Must is out regardless of price or appeal. Do not walk the full feature set of every tool. 10. Match pricing model to USAGE_SHAPE. Event priced tools punish high engagement apps that fire many events per user; user or MTU priced tools may be cheaper for the same app. Estimate cost against the real numbers, not a generic tier. 11. Score the survivors in a matrix across: each Must and Should feature (yes / no / ?), pricing fit, and overall fit (culture match, user access model, support quality, contract flexibility, community reputation). Multiple weighted requirements, never one. 12. Recommend one tool and name the single reason each rejected tool was cut. OUTPUT FORMAT 1. Clarifying questions (only if triggered), then stop. 2. Data Layer Specification: a table of Variable | Notation | Example Value | Why this name, plus a short data dictionary of ambiguous action definitions. 3. Markup Standard: 2 to 3 example data-* attribute snippets on real elements from this product. 4. Requirements: the feature list ranked by MoSCoW. 5. Tool Comparison Matrix: rows = features + pricing + overall fit, columns = shortlisted tools. 6. Recommendation: one tool, the reason, and one line per rejected tool. 7. Verify Before You Decide: a fact check list of every vendor specific claim made above (feature support marked yes or no, pricing model, price levels, limits). Vendor capabilities and pricing change often, so phrase each item so it can be confirmed on the vendor's current pricing page or in a sales call. Mark any claim you are unsure of with "?", never a confident yes or no. SELF CHECK before finishing - Verify every variable name passes tool agnostic, generic, and consistent. Rewrite any that fail. - Verify no ambiguous action is left undefined and no notation mixing remains. - Verify no tool survived the filter with an unmet Must have. - Verify pricing was judged against the actual usage shape, not a headline price. - Verify every vendor specific feature and pricing claim appears in Verify Before You Decide, and that uncertain claims are marked "?" in the matrix, not guessed. - Avoid these failure modes: recommending a tool because it is popular; treating users and sessions as the same scope; precomputed variables that break on product change; keeping a statistic you cannot attribute to a named source.
For the most capable models. Goal and quality bar up front.
You are a senior product analytics architect. Deliver two artifacts: a tool agnostic data layer specification a developer can implement, and a requirements first tool selection a stakeholder can approve. Lead your output with the recommended tool and the single reason for it; put the spec, the matrix, and the rejection reasons underneath. CONTEXT Product or site: {{PRODUCT_DESCRIPTION}} Business model and plan tiers: {{BUSINESS_MODEL_AND_TIERS}} Current stack and pain points: {{CURRENT_STACK_AND_PAINS}} Stakeholder groups and what each cares about: {{STAKEHOLDERS_AND_GOALS}} Top decisions the data must answer: {{KEY_QUESTIONS}} Usage shape (events per user, sessions, monthly active users): {{USAGE_SHAPE}} Constraints (budget, data residency, developer capacity, tech stack): {{CONSTRAINTS}} Candidate tools already in play, or "none": {{CANDIDATE_TOOLS}} If PRODUCT_DESCRIPTION, KEY_QUESTIONS, USAGE_SHAPE, or STAKEHOLDERS_AND_GOALS is missing or thin, ask one focused question and stop rather than guessing. PRINCIPLES Derive the data layer from KEY_QUESTIONS: a structured object of key value pairs so tools read semantic values instead of scraping HTML. Every variable name must be tool agnostic (name the purpose, not a vendor), generic (survive a plan rename or product change), and consistent (one scheme, raw values you derive from rather than precomputed ones). Store dates as Unix epoch timestamps. Pick flat or nested notation and never mix. Mark up every interactive element with HTML5 data-* attributes; marking up broadly is not the same as tracking everything. Give every ambiguous action an explicit definition in a data dictionary. Anchor tracking in the Definition of Done so it ships with each feature, never retrofitted. For tool selection, capture use cases from STAKEHOLDERS_AND_GOALS first, then derive features and rank them with MoSCoW. Eliminate any tool that misses one Must have before comparing anything else. Match pricing to the real USAGE_SHAPE (event priced tools punish high engagement apps). Score survivors across Must and Should features, pricing fit, and soft fit, then recommend one tool and cut the rest with one reason each. QUALITY BAR Excellent output: every variable name is defensibly tool agnostic, generic, and consistent with a one line reason; dates are Unix timestamps under one notation; every ambiguous action is defined; markup uses data-* attributes on real elements from this product; the shortlist eliminates on Must have gaps first; pricing is judged against the actual numbers; and it ends with a Verify Before You Decide list turning every vendor feature and pricing claim into a checkable item, with uncertain claims marked "?". DO NOT invent data, statistics, or vendor capabilities you cannot confirm; mark unsure claims with "?" rather than a confident yes or no. Do not recommend a tool for popularity, conflate users with sessions, or pad with generic advice.
Five lines. Speed over rigor.
Act as a product analytics architect for {{PRODUCT_DESCRIPTION}} with these goals: {{KEY_QUESTIONS}}, this usage shape: {{USAGE_SHAPE}}, and candidates {{CANDIDATE_TOOLS}}. Give me a tool agnostic data layer (variables named for purpose, dates as Unix timestamps, one notation) and a MoSCoW ranked shortlist that cuts any tool missing a Must have, ending in one recommendation. Mark any vendor claim you are unsure of with "?".
Want all 120 prompts in one workspace?
Every prompt in this library, organized by task. Free.
What good output looks like
- Every variable name in the spec is defensibly tool agnostic, generic, and consistent, with a one line reason attached to each
- Dates are Unix timestamps, one notation is used throughout, and every ambiguous action has an explicit definition in the data dictionary
Show 3 more quality checks
- The tool selection eliminates candidates on Must have gaps first, then scores survivors on features, usage adjusted pricing, and soft fit, ending in one clear recommendation with reasons for every rejection
- Markup examples use HTML5 data-* attributes on real elements from your product, not a generic ecommerce template
- The output ends with a Verify Before You Decide list that turns every vendor feature and pricing claim into a checkable item, with uncertain claims marked "?" instead of guessed
Related prompts
- Set Up Clean Tracking and UTM Conventions
Once the data layer and tool are chosen, standardize how campaign traffic gets tagged so attribution stays clean.
- Choose Core Metrics and KPIs
With reliable collection in place, pick the small set of leading and lagging metrics the business will actually watch.
- Build a Dashboard That Drives Action
Turn the metrics your new stack captures into a view stakeholders can act on.
Free to use and share. If you republish a prompt, link back to this library.