The DataLens Blog

Why your ad numbers don't match — explained plainly

Plain-English answers to the reporting questions every marketer asks: why platforms disagree, which number to trust, and what to do next. No SQL needed to start.

Latest Articles

AI + Analytics9 min readSome SQL

Prompt injection is hiding in your marketing data

Campaign tags, comments and search terms are written by strangers. How text in your data steers an AI summary, and defences that hold when the model is fooled.

Oct 4, 2026Read article
AI + Analytics9 min readSome SQL

ChatGPT is sending you customers, and GA4 calls them Direct

AI assistants send real visitors, many with no referrer. Measure a floor in GA4, estimate a ceiling from Direct, and narrow the range with customer answers.

Oct 4, 2026Read article
AI + Analytics9 min readSome SQL

Ask the same question twice, get two numbers

The same question can get different AI answers. Why ambiguity, not randomness, is usually the cause — and how agreement across runs becomes a confidence check.

Oct 4, 2026Read article
AI + Analytics9 min readSome SQL

Why your AI report always has a reason

AI reports give a cause for every wobble. Why models narrate noise, and the normal ranges, maturity flags and evidence rules that let them say “no change”.

Oct 4, 2026Read article
AI + Analytics9 min readSome SQL

Reasoning models vs fast models: which questions deserve “thinking”?

Reasoning models help on multi-step diagnosis and add nothing to simple lookups. How to route analytics questions by type to cut model cost and wait time.

Oct 4, 2026Read article
Campaign Diagnostics & Optimization9 min readSome SQL

Diwali CPMs doubled: is it the auction or your account?

Festive auctions push CPMs up fast. Split a ROAS drop into price, click, conversion and basket effects before you touch creative, bids or budgets.

Oct 4, 2026Read article
Campaign Diagnostics & Optimization9 min readSome SQL

Your 30 ads are really 3

Meta’s Andromeda system groups look-alike ads together. Count real concepts instead of uploads, and build a creative mix the auction can tell apart.

Oct 4, 2026Read article
Campaign Diagnostics & Optimization10 min readSome SQL

AI Max turned on: new demand or rerouted exact match?

AI Max expands Search past your keyword list. Split its queries into new demand and traffic rerouted from your keywords, then judge it on incremental CPA.

Oct 4, 2026Read article
Campaign Diagnostics & Optimization9 min readSome SQL

Where your PMax money actually goes

Performance Max now reports spend and conversions by channel. Compare Search, YouTube, Display and Discover side by side and find the channel eating budget.

Oct 4, 2026Read article
Campaign Diagnostics & Optimization10 min readSome SQL

Your winning ad might be a coin flip

Two identical ads can show a 20% gap by pure chance. How much data a creative test needs, why peeking creates fake winners, and when to call a result.

Oct 4, 2026Read article
Metric Discrepancies & Attribution10 min readSome SQL

The Cross-Channel Cannibalization Matrix

Brand search, retargeting and email often all claim the same order. Build an overlap matrix in SQL to spot stolen baseline demand.

Sep 17, 2026Read article
Databases & Query Optimization9 min readSome SQL

The Physical vs. Logical Storage Trap

Uncompressed logical storage can quietly double a BigQuery bill. When switching to physical storage billing cuts storage costs by 50-70%, and when not.

Sep 17, 2026Read article
AI + Analytics9 min readSome SQL

Why Fine-Tuning LLMs for Internal SQL Is Almost Always a Mistake

Teams spend months fine-tuning a model on internal SQL, then it breaks the day a table changes. Why dynamic schema retrieval beats fine-tuning.

Sep 17, 2026Read article
Campaign Diagnostics & Optimization10 min readSome SQL

Advantage+ and PMax: The Black-Box Cannibalization Audit

Advantage+ and PMax post stunning ROAS by bidding on existing customers and brand terms. Audit customer mix, set brand exclusions, force prospecting.

Sep 17, 2026Read article
Campaign Diagnostics & Optimization9 min readSome SQL

The Learning Phase Myth: When to Edit and When to Wait

Buyers let money bleed for days fearing a learning-phase reset. What actually triggers it, when a reset is good, and a 5-point triage before editing.

Sep 17, 2026Read article
Metric Discrepancies & Attribution9 min readSome SQL

Retargeting steals credit from prospecting (and how to prove it)

Retargeting reports 9x ROAS by harvesting demand prospecting created. The pause test that measures its true share and the weekly budget split.

Sep 16, 2026Read article
Metric Discrepancies & Attribution9 min readSome SQL

View-through conversions: when to count them, when to ignore them

One toggle moves reported conversions 35% with zero business change. What a view-through really is and the three-column report that keeps it honest.

Sep 16, 2026Read article
Metric Explainers9 min readSome SQL

CPA vs CAC vs CPP: stop mixing them in one deck

CPA counts actions, CAC counts new customers, CPP counts platform claims. Which one governs budgets, and one query that computes all three.

Sep 16, 2026Read article
AI + Analytics9 min readSome SQL

15 prompts marketers actually reuse (copy-paste library)

Fifteen copy-paste prompts for three jobs: pace the money, diagnose the move, decide the budget. Each makes the answer checkable in 60 seconds.

Sep 16, 2026Read article
Metric Discrepancies & Attribution10 min readSome SQL

Same word, different maths

Meta and Google use the same metric names for different maths. How to reconcile conversions, windows, ROAS and frequency every Monday.

Sep 10, 2026Read article
Metric Discrepancies & Attribution10 min readSome SQL

GA4 doesn’t match ads?

When GA4 and ad platforms show different numbers, run this 4-step sequence to diagnose tagging breaks, window mismatches, hidden slices, and definition gaps.

Sep 10, 2026Read article
Metric Discrepancies & Attribution9 min readSome SQL

Why yesterday’s ROAS lies

Same-day conversions are provisional because buyers take time. A two-read rhythm so you never pause a winning ad on yesterday's partial ROAS.

Sep 10, 2026Read article
Databases & Query Optimization10 min readDeep dive

The GA4 BigQuery export schema, explained

A marketer's guide to GA4 export's nested table structure — what event_params actually holds, and how to query it without a data engineering background.

Sep 10, 2026Read article
Databases & Query Optimization8 min readSome SQL

Partitioning and Clustering, Explained With One Marketing Table

Walk through what partitioning and clustering actually do to a query, using a single GA4-style events table as the running example.

Sep 10, 2026Read article
Databases & Query Optimization7 min readSome SQL

Google Ads Data Transfer vs the API

Two ways to get Google Ads data into BigQuery, with very different freshness, cost and maintenance tradeoffs. A practical comparison for choosing one.

Sep 10, 2026Read article
Metric Explainers6 min readNo code

Blended CAC vs. Channel CAC — Which One Goes to the Board?

Channel-reported CAC is almost always cheaper than blended CAC, and both numbers are correct. Here's how to know which one belongs in which conversation.

Sep 10, 2026Read article
Metric Explainers6 min readSome SQL

MER Explained, With the SQL

Marketing Efficiency Ratio sidesteps attribution disagreements entirely. Here's the formula, a worked example, and the query that computes it from a warehouse.

Sep 10, 2026Read article
Metric Explainers8 min readSome SQL

Attribution Windows: 1-Day Click, 7-Day View, and Why Your Numbers Moved

Every ad platform ships a different default attribution window. Here is what each window setting actually changes, with worked examples.

Sep 10, 2026Read article
Metric Explainers9 min readSome SQL

Incrementality vs. Last-Click for Teams Without a Data Scientist

A holdout test is the only way to know an ad's true causal effect. Here is a lightweight version any team can run without a dedicated experimentation function.

Sep 10, 2026Read article
Metric Explainers6 min readNo code

LTV:CAC Is a Ratio, Not a Target — How to Read It Honestly

A 5:1 LTV:CAC ratio means very different things depending on payback time. How to read the ratio alongside the number that actually matters.

Sep 10, 2026Read article
AI + Analytics7 min readSome SQL

Text-to-SQL Isn't the Hard Part — Schema Context Is

Correct SQL syntax is the easy 20%. Knowing which of five tables holds "revenue" and how they join is what decides whether an AI answer is right.

Sep 10, 2026Read article
AI + Analytics5 min readSome SQL

How to Audit an AI-Generated Query in 60 Seconds

A fast checklist for scanning any AI-written SQL query before you trust its output — the joins, the filters, and the aggregation, in that order.

Sep 10, 2026Read article
AI + Analytics5 min readNo code

Why Every DataLens Answer Ships Its SQL

A product philosophy note: why we decided a number without its query attached isn't a trustworthy number, and what that decision costs us.

Sep 10, 2026Read article
AI + Analytics5 min readNo code

Bring Your Own API Key: What That Actually Means for Your Data

DataLens lets you connect your own model provider key instead of routing through ours. Here is what that changes about where your data goes.

Sep 10, 2026Read article
Metric Discrepancies & Attribution10 min readSome SQL

The tiny URL code your attribution depends on

GCLID and FBCLID tie customer clicks to database orders. Here is where click IDs break, how to store them, and how server-side APIs recover lost attribution.

Sep 6, 2026Read article
Metric Discrepancies & Attribution10 min readSome SQL

Teach Google what a real sale looks like

Pixels track lead forms; your CRM tracks revenue. How to feed verified offline sales back into Google and Meta so smart bidding chases real customers.

Sep 6, 2026Read article
Metric Discrepancies & Attribution9 min readSome SQL

Why your iPhone numbers got worse

Removed device IDs halved dashboard ROAS while real sales held steady. How to measure iOS with SKAN and blended MER instead of broken pixels.

Sep 6, 2026Read article
Databases & Query Optimization10 min readDeep dive

One currency, one timezone

USD and INR spend in one column, UTC and account-timezone days in one join. The exchange-rate table, convert-then-truncate rule and view to report from.

Sep 6, 2026Read article
Databases & Query Optimization11 min readDeep dive

Why your revenue doubled overnight

Ingestion doubles, fan-out joins and grain confusion multiply rows three different ways. The diagnostics that catch each and the dedup views that prevent them.

Sep 6, 2026Read article
Databases & Query Optimization10 min readDeep dive

Stale dashboards lie confidently

An expired credential made a Monday review debate a demand collapse that never happened. Three layers of checks: freshness, shape and reconciliation.

Sep 6, 2026Read article
Metric Explainers10 min readSome SQL

Breakeven ROAS From First Principles: Margin, Fees, Shipping and the Floor Under Every Target

One division sets the floor beneath every target you will ever set. Deriving breakeven from the full variable stack and running it as a bidding guardrail.

Sep 6, 2026Read article
Metric Explainers11 min readSome SQL

Cohort Payback Curves: Why Month-0 ROAS Misleads Repeat-Purchase Brands

Snapshot ROAS judges a movie by its first frame. Group customers by acquisition month, read payback as a crossing point and separate retention.

Sep 6, 2026Read article
Metric Explainers10 min readSome SQL

Discount-Adjusted Metrics: How Sale Events Inflate ROAS While Destroying Contribution

Revenue triples and profit misses anyway. Margin compression, pull-forward holes and price-anchor erosion — and the reporting that prices each sale honestly.

Sep 6, 2026Read article
AI + Analytics9 min readSome SQL

Benchmarking an AI Analyst on Your Own 20 Golden Questions

Fluency is not accuracy and demos are not decisions. Building a verified question-SQL-answer suite that scores models, prompts and schema changes.

Sep 6, 2026Read article
AI + Analytics10 min readSome SQL

Anomaly Alerts That Do Not Spam: Static Thresholds vs Dynamic Baselines

Every false alarm trains readers to ignore the real one. Respecting data maturity, expecting seasonality, and the severity ladder that keeps channels trusted.

Sep 6, 2026Read article
AI + Analytics10 min readSome SQL

Least-Privilege Data Access for AI Tools: Views, Redaction, Row Limits

Exposing every table to an AI tool is a privacy risk and an accuracy problem. The views, tokenisation and caps that narrow access and improve answers.

Sep 6, 2026Read article
Campaign Diagnostics & Optimization9 min readSome SQL

Budget pacing mid-flight

Prorated expectations, partial-day honesty and the intraday trap: how to tell on the 12th whether you will overspend, underspend or land exactly on plan.

Sep 6, 2026Read article
Campaign Diagnostics & Optimization10 min readSome SQL

Creative fatigue vs audience saturation

Frequency plus reach plus CPM decompose every scaling stall into its true cause. New creative fixes one of them; only a wider audience fixes the other.

Sep 6, 2026Read article
Campaign Diagnostics & Optimization10 min readSome SQL

Search-term mining that pays for itself

The search terms report is customers telling you what they wanted. A 30-minute weekly routine that turns it into negatives and new keywords.

Sep 6, 2026Read article
Campaign Diagnostics & Optimization9 min readSome SQL

Impression-share autopsy

Two loss columns prescribe opposite fixes: one wants money, the other wants better bids, quality or creative. Reading the split before spending a rupee more.

Sep 6, 2026Read article
Campaign Diagnostics & Optimization10 min readSome SQL

Geo waste hides in your pincode map

Delivery failures, COD refusals and serviceability gaps make some pincodes structurally unprofitable. Overlay RTO on geo data to build the exclusion list.

Sep 6, 2026Read article
Campaign Diagnostics & Optimization9 min readSome SQL

What broke the campaign last Tuesday

Performance breaks have authors: edits, budget moves, auction shifts. Correlating the change log with the break before touching anything else.

Sep 6, 2026Read article
Metric Discrepancies & Attribution11 min readSome SQL

Shopify, GA4 and Meta disagree?

Three systems, one day, three revenue totals — and none of them is broken. Here is how to reconcile timezones, taxes, shipping, and refunds line by line.

Aug 28, 2026Read article
Metric Discrepancies & Attribution11 min readSome SQL

What “How did you hear about us?” is really for

Post-purchase surveys never match tracking pixels because they measure memory, not clicks. How to use survey data to spot channels your pixels miss.

Aug 28, 2026Read article
Metric Discrepancies & Attribution10 min readSome SQL

UTM names that survive three agencies

Most UTM taxonomies fall apart the moment a new agency onboards. Here is a convention, a weekly validator query, and a clean normalisation view.

Aug 28, 2026Read article
Metric Discrepancies & Attribution10 min readSome SQL

Half your conversions are estimates.

Ad platforms model conversions to fill privacy blind spots. What Google, Meta and GA4 estimate, and how to report without misleading your team.

Aug 28, 2026Read article
Databases & Query Optimization11 min readDeep dive

Your first 10 BigQuery cost guardrails

Ten BigQuery cost controls you can set up in an afternoon, ranked by savings per hour: custom quotas, maximum bytes billed, partition filters and more.

Aug 28, 2026Read article
Databases & Query Optimization11 min readDeep dive

Incremental models without dbt

Stop rebuilding a rolling table every morning without adopting a framework: MERGE, a watermark and a late-arriving-data window in plain scheduled SQL.

Aug 28, 2026Read article
Databases & Query Optimization11 min readDeep dive

Joining ad spend to orders with no common key

Campaign spend and order rows share no id. The three join grains that work, the fan-out bug that breaks the naive join, and the SQL for each.

Aug 28, 2026Read article
Databases & Query Optimization10 min readDeep dive

Postgres vs a warehouse for marketing reporting

Your production database can carry marketing reporting further than you think, until it cannot. Four signals it is time to move, and the cheapest next step.

Aug 28, 2026Read article
Metric Explainers11 min readSome SQL

Contribution-Margin ROAS: The Only ROAS That Survives a CFO Review

Revenue ROAS answers a question finance never asked. Rebuild it on contribution margin, with the cost lines people forget and the SQL that computes it.

Aug 28, 2026Read article
Metric Explainers10 min readSome SQL

New vs. Returning Customer ROAS, and Why Blended Hides an Acquisition Problem

A stable blended ROAS can conceal acquisition falling apart underneath it. Split the numerator by customer type and the trend you actually need to see appears.

Aug 28, 2026Read article
Metric Explainers10 min readSome SQL

Payback Period vs. LTV:CAC — Which One Actually Gates Your Ad Budget

LTV:CAC says whether a customer is worth acquiring; payback says whether you can afford it this quarter. Only one of them is a budget constraint.

Aug 28, 2026Read article
Metric Explainers12 min readSome SQL

RTO and COD in Indian D2C: Your ROAS Is Wrong Until Delivery Confirms

A COD order is a promise, not revenue. With RTO at 15-35%, order-time ROAS overstates reality by up to a third. How to measure delivered ROAS instead.

Aug 28, 2026Read article
Metric Explainers10 min readSome SQL

Frequency, Reach and Saturation: Reading the Curve Before You Scale Spend

Scaling spend in a finite audience buys frequency, not reach. How to read the three curves together and tell which wall your campaign has hit.

Aug 28, 2026Read article
AI + Analytics11 min readSome SQL

What an AI Analyst Can't Do Yet — an Honest List

Eight things an AI analyst genuinely cannot do, written by someone building one. Where the ceiling is, why it is there, and which limits are shrinking.

Aug 28, 2026Read article
AI + Analytics10 min readSome SQL

Semantic Layers vs. Prompting: Where Business Definitions Should Live

You can put "active customer means ordered in 90 days" in a prompt, or in a semantic layer. One of those is a definition; the other is a suggestion.

Aug 28, 2026Read article
AI + Analytics11 min readDeep dive

How We Keep an LLM From Inventing a Column Name

A model that has never seen your schema will guess order_total and be wrong. Four layers that stop it: retrieval, context, dry-run validation, repair.

Aug 28, 2026Read article
AI + Analytics10 min readDeep dive

The Real Cost of an AI Analytics Question

Two costs stack on every AI-generated answer, and the smaller one gets all the attention. A line-by-line breakdown of where the money actually goes.

Aug 28, 2026Read article
AI + Analytics9 min readSome SQL

Scheduled AI Reports vs. Dashboards: When a Daily Narrative Beats a Chart

A dashboard waits to be opened. A scheduled narrative arrives whether or not anyone was looking. Which failure mode each one has, and how to pick.

Aug 28, 2026Read article
Metric Discrepancies & Attribution11 min readSome SQL

Why Google Ads ROAS never matches your database

Google Ads, Meta, and your database each attribute revenue differently. Here is why the numbers never match and how to reconcile them with a 3-tier framework.

Aug 26, 2026Read article
Databases & Query Optimization9 min readSome SQL

How to read a database query plan

Warehouses bill by data scanned, not rows returned. How to read a query plan and estimate before you run, plus three habits that cut costs 10-100x.

Aug 26, 2026Read article
AI + Analytics8 min readSome SQL

Seven Questions to Ask Before You Trust an AI's Answer About Your Data

A syntactically valid query can still answer the wrong question. Seven concrete checks to run before you act on a number an AI gave you.

Aug 26, 2026Read article