In short
Marketing and customer analytics is the use of transaction, campaign and behavioural data to decide whom to target, with what offer, through which channel, and whether the spend paid for itself. It joins descriptive measurement (funnel metrics, cohorts, RFM) with predictive models (churn, propensity, CLV) and causal methods (A/B tests, geo holdouts, marketing mix models). It is examined in B.Sc Data Science / BBA-analytics papers as segmentation, CLV, RFM, basket analysis, attribution and hypothesis testing, and is the single most common interview area for analyst roles at Flipkart, Myntra, Nykaa, Swiggy, Zepto, Jio, HUL, HDFC Bank, Policybazaar and at analytics firms such as Mu Sigma, Fractal, LatentView, ZS, Kantar and GroupM. In India the work is also bounded by law — the DPDP Act, 2023, TRAI's commercial-communication (DLT) rules, the ASCI code and the CCPA dark-pattern guidelines.
Explained
The customer funnel and the metric stack
- Funnel stages: impression → click → visit → add-to-cart → checkout → purchase → repeat. Conversion rate at each step; drop-off is the complement.
- AARRR (pirate metrics): Acquisition, Activation, Retention, Referral, Revenue — the standard framework for a D2C or app business.
- Media metrics: CPM (cost per 1,000 impressions), CPC, CTR, CPA/CPI (cost per acquisition/install), ROAS (revenue ÷ ad spend), CPO (cost per order).
- Customer metrics: AOV (average order value), ARPU, purchase frequency, basket size (units/order), repeat-purchase rate, churn rate, CLV, CAC, payback period.
- Experience metrics: NPS = %promoters (9-10) − %detractors (0-6); CSAT; CES. NPS is a diagnostic, not a revenue forecast.
- Vanity vs actionable: impressions, followers and "reach" are vanity unless tied to incremental revenue or margin; contribution margin per customer is actionable.
- Definition discipline: an "active user" (MAU on what event?), a "new customer" (first order vs first account) and "revenue" (gross, net of returns, net of GST) must be defined once in a metric dictionary — most analytics disputes in Indian e-commerce are definition disputes, not maths disputes.
Segmentation, RFM and clustering
- Segmentation bases: demographic (age, income, city tier), geographic (metro / tier-2 / tier-3, PIN code), psychographic (lifestyle, values), behavioural (recency, frequency, category, channel, device) and needs/benefit based. Behavioural segments predict best because they use revealed behaviour.
- A good segment is: measurable, substantial, differentiable, accessible and actionable (the classic MDSAA test). Segmentation with no different action per segment is wasted work.
- STP process: Segment the market → Target the chosen segments (size × growth × fit × competition) → Position with a value proposition.
- RFM analysis: score each customer on Recency (days since last purchase), Frequency (orders in a window) and Monetary (spend in the window); usually quintiles 1-5 (5 = best, and for R, 5 = most recent). Gives 125 cells, collapsed into named segments: Champions (555), Loyal, Potential loyalists, New, At-risk high-value (low R, high F/M), Hibernating, Lost.
- Why RFM survives: no model training, explainable to marketing teams, and recency alone is the strongest single predictor of the next purchase in retail.
- Clustering: k-means (needs scaled numeric features; choose k by elbow on within-cluster SSE or silhouette score), hierarchical (dendrogram, no k needed, O(n²) memory), DBSCAN (density, finds outliers), Gaussian mixture (soft assignment). k-means assumes spherical, equal-variance clusters and is sensitive to outliers and to scaling.
- Practice: log-transform skewed money variables, scale, remove the top 0.1% whales (profile them separately), then profile each cluster on business variables not used in fitting — that is the test of whether the segments are real.
Customer lifetime value, churn and retention
- CLV (customer lifetime value): the discounted contribution margin a customer is expected to deliver over the relationship. Historic CLV looks back; predictive CLV looks forward and is what budgeting uses.
- Contractual vs non-contractual: telecom, insurance, SaaS and OTT subscriptions have observable churn (a cancellation event) → survival/logit models. Retail and e-commerce have no churn event, only silence → BG/NBD + Gamma-Gamma models (Python
lifetimes) estimate purchase frequency and spend per transaction. - Churn definitions: contractual = non-renewal; non-contractual = no purchase in a window (for example 180 days for grocery, 365 days for apparel) — the window must come from the inter-purchase-time distribution, not from habit.
- Churn modelling pipeline: label window and observation window fixed first → features (recency, frequency, trend, complaints, discount dependence, app sessions) → logistic regression / gradient boosting (XGBoost, LightGBM) → evaluate with AUC-ROC, precision@k, lift in the top decile → act on the top decile with a retention offer, and measure that offer with a holdout.
- Leakage is the usual failure: any feature recorded after the label window (a cancellation ticket, a refund) makes the model look brilliant and useless.
- Cohort analysis: group customers by acquisition month and track retention or revenue at month 1, 2, 3 … Reveals whether a drop is a product problem (all cohorts decay) or an acquisition-quality problem (new cohorts worse than old).
- Retention curves flatten; the asymptote is the loyal core. Retention compounds: +5 percentage points of monthly retention can raise CLV far more than any CAC reduction.
- CAC and payback: CAC = fully loaded acquisition spend ÷ new customers acquired (include creative, agency fee, discounts given to acquire). CLV/CAC ≥ 3 is the common venture benchmark; CAC payback in months is what cash-constrained Indian D2C brands actually track.
- Blended vs paid CAC: blended divides by all new customers including organic — it flatters performance; paid CAC divides paid spend by paid-attributed customers. Quote which one you mean.
Campaigns: experiments, attribution and marketing mix modelling
- A/B test: randomise units (users, sessions, or geos) into control and treatment, change one thing, compare a pre-declared primary metric. Randomisation is what buys causality.
- Steps: define primary metric and MDE (minimum detectable effect) → compute sample size and duration → randomise at the right unit → run for whole weekly cycles → analyse once at the planned end → check guardrail metrics (returns, unsubscribes, margin).
- Statistics: two-proportion z-test for conversion, t-test or bootstrap for revenue per user (heavy-tailed), chi-square for multi-arm counts. Report the confidence interval, not just the p-value.
- Pitfalls: peeking (repeated looks inflate false positives — use sequential or group-sequential methods if you must look), sample ratio mismatch (traffic split not 50/50 → broken assignment), novelty and primacy effects, multiple comparisons (Bonferroni or FDR), and interference between users (fix by cluster/geo randomisation).
- Attribution models: last-click (default, overcredits bottom-funnel search and retargeting), first-click, linear, time-decay, position-based (40/20/40), and data-driven (Shapley value, Markov removal effect). All are correlational credit-splitting rules, not causal.
- Why attribution is in trouble in India too: walled gardens report their own self-attributed conversions, iOS ATT and third-party-cookie restrictions break cross-site identity, and RBI card tokenisation plus app-level consent limit deterministic joins. Hence the shift back to experiments and models.
- Incrementality testing: keep a randomised holdout (say 5-10% of the audience never exposed) or run a geo-lift test (matched cities, one set switched off), and compute incremental revenue = (revenue/user exposed − revenue/user control) × exposed users. iROAS is the number a CFO should fund, not platform ROAS.
- Marketing mix modelling (MMM): regress weekly sales on media spend by channel plus price, promotion, distribution, seasonality, festive dummies (Diwali, Onam, GST-rate changes) and competitor activity. Two transforms are examined: adstock/carryover (A_t = x_t + λA_{t−1}) and saturation/diminishing returns (log or Hill curve). Output: channel contribution, marginal ROI, optimal reallocation.
- MMM limits: aggregate weekly data, multicollinearity between channels, short histories, and it cannot target individuals. MTA vs MMM vs experiments are complements: experiments calibrate, MMM allocates budget, MTA optimises within a channel.
Pricing, promotion and basket analytics
- Price elasticity of demand measures % change in quantity per % change in price; estimated from price variation across time, stores or geos, or from a price test. Essentials are inelastic, discretionary categories elastic.
- Lerner condition: the profit-maximising contribution margin ratio = −1/ε. Elastic demand (|ε| large) ⇒ thin margins; this is why fast-fashion discounts and premium skincare does not.
- Promotion evaluation: incremental units must cover the margin given away; measure cannibalisation (same brand, other SKU), pull-forward (buyers who would have bought later) and pantry loading. Subscription/loyalty discounts need a holdout too.
- Market basket analysis (association rules): find itemsets that co-occur; Apriori and FP-Growth algorithms, metrics support, confidence, lift, leverage, conviction. Lift > 1 means positive association; a high-confidence rule with lift ≈ 1 is just a popular item (the classic "milk" trap).
- Uses: cross-sell bundles, planogram and shelf layout, combo offers on Swiggy/Zomato, "frequently bought together" on Flipkart.
- Recommenders: content-based (item features), collaborative filtering (user-user, item-item, matrix factorisation), hybrid; evaluated by precision@k, recall@k, NDCG, MAP, coverage and diversity. Cold start is handled with popularity or content features.
- Next-best-action / propensity: score every customer for every offer, rank, apply contact-policy rules (frequency caps, channel cost, eligibility).
- Uplift (incremental-response) modelling: predicts the *change* in response caused by contact, not the response level. Four groups — persuadables (target), sure things, lost causes, sleeping dogs (contact hurts). Methods: two-model (T-learner), class-transformation, causal forests; evaluated with Qini/uplift curves. Targeting a high-propensity model often just contacts people who would have bought anyway.
Data foundations and the Indian rule-set
- Data sources: POS/order tables, CRM, app and web events (GA4, Firebase, Mixpanel), ad platform exports, call-centre and ticket logs, surveys, panel data (NielsenIQ, Kantar).
- Identity resolution: stitch device ID, cookie, mobile number, email and loyalty ID into one customer key; deterministic where an ID matches, probabilistic otherwise. Mis-stitching inflates "customers" and destroys CLV estimates.
- Stack: SQL + Python (pandas, scikit-learn, statsmodels, mlxtend, lifetimes), warehouse (BigQuery/Snowflake/Redshift), CDP and engagement tools widely used in India (CleverTap, MoEngage, WebEngage), BI in Power BI/Tableau/Looker Studio.
- DPDP Act, 2023: personal data for marketing needs free, specific, informed, unconditional and unambiguous consent, a clear notice, purpose limitation, and honouring withdrawal/erasure requests; rules under the Act were notified in November 2025 with phased timelines — check the current notified dates before relying on them. Treat consent status as a column in every campaign table.
- TRAI TCCCPA, 2018 (DLT): commercial SMS/voice requires registered sender headers and pre-approved templates, scrubbing against DND/consent registries, and respect for time-band and category preferences; promotional SMS traffic is blocked otherwise.
- Advertising conduct: the ASCI code (truthful, non-misleading, substantiated claims, influencer disclosure), the Consumer Protection Act, 2019 with CCPA guidelines on misleading advertisements and on dark patterns (2023) — false urgency, basket sneaking, drip pricing, forced action and nagging are specifically named, which rules out several "conversion-optimisation" tactics.
- Pricing arithmetic must be net of GST: slabs are 5%, 18% and 40% since 22 September 2025, so an MRP-based revenue series changes when a category is re-slotted — add a dummy or deflate to net realisation in MMM.
- Broader data-protection practice (DPIAs, retention, breach handling) sits in the governance topic; here, carry consent, suppression lists and purpose limitation into every model and campaign.
Key points
- Funnel conversion - stage-wise ratio; multiply stage rates to get end-to-end conversion.
- AOV - revenue ÷ orders; ARPU - revenue ÷ users. Different denominators, routinely confused.
- RFM - quintile scores on recency, frequency, monetary value; recency is the strongest single predictor of repeat purchase.
- CLV - discounted future contribution margin, not future revenue; margin and discount rate must be stated.
- CAC - fully loaded acquisition cost per new customer; blended CAC flatters, paid CAC is honest.
- CLV/CAC ≥ 3 and payback within 12 months - common benchmarks, not laws.
- Cohort analysis - acquisition-month groups tracked over time; separates product decay from acquisition quality.
- Churn window - for non-contractual businesses, choose it from the inter-purchase-time distribution.
- BG/NBD + Gamma-Gamma - standard probabilistic CLV pair for retail: frequency model × monetary-value model.
- A/B test - randomised comparison; pre-declare metric, MDE, sample size and end date; never peek-and-stop.
- Sample ratio mismatch - split away from the designed ratio means the experiment is invalid, whatever the p-value says.
- Attribution - credit-splitting heuristic (last-click, linear, time-decay, position-based, Shapley); correlational, not causal.
- Incrementality / iROAS - measured against a randomised or geo holdout; the only ROAS worth budgeting on.
- MMM - aggregate regression with adstock (carryover) and saturation; gives channel contribution and marginal ROI.
- Association rule metrics - support (how often), confidence (conditional probability), lift (vs independence); lift > 1 is the signal.
- Price elasticity ε - %ΔQ ÷ %ΔP; optimal margin ratio = −1/ε (Lerner).
- Uplift modelling - models the treatment effect; protects against sleeping dogs that propensity models cheerfully spam.
- DPDP Act, 2023 + TRAI DLT - consent, purpose limitation, registered headers/templates and DND scrubbing govern Indian outreach; CCPA dark-pattern guidelines govern on-site tactics.
Formulas and examples
AOV = net revenue (₹) / number of orders; ARPU = net revenue (₹) / active users
CTR = clicks / impressions; CPC = spend / clicks; CPM = 1,000 × spend / impressions; CPA = spend / conversions
ROAS = attributed revenue (₹) / ad spend (₹); iROAS = incremental revenue (₹) / ad spend (₹)
Churn rate c = customers lost in period / customers at start of period; Retention r = 1 − c
Average customer lifetime ≈ 1 / c (periods), for constant churn
CLV (future periods) = m × r / (1 + d − r), where m = contribution margin per period (₹), r = retention, d = discount rate per period
CAC = total acquisition spend (₹) / new customers acquired; Payback (periods) = CAC / m
Two-proportion z = (p₂ − p₁) / √[ p̂(1−p̂)(1/n₁ + 1/n₂) ], p̂ = pooled conversion rate
Sample size per arm (α = 5%, power 80%, proportions) n ≈ 16 p(1−p) / Δ², Δ = absolute lift to detect
Support(A∪B) = P(A and B); Confidence(A→B) = P(B|A); Lift(A→B) = Confidence / P(B); Leverage = P(A∩B) − P(A)P(B); Conviction = (1 − P(B)) / (1 − Confidence)
Price elasticity ε = (%ΔQ) / (%ΔP); profit-maximising margin (p − c)/p = −1/ε
Adstock A_t = x_t + λ·A_{t−1} (0 ≤ λ < 1, x_t = spend in week t, ₹)
NPS = %promoters − %detractors (range −100 to +100)
Example 1 - RFM scoring for a D2C brand. Cut-offs (quintiles from the brand's own base): R ≤30 d = 5, 31-60 = 4, 61-120 = 3, 121-240 = 2, >240 = 1; F ≥8 = 5, 5-7 = 4, 3-4 = 3, 2 = 2, 1 = 1; M ≥₹20,000 = 5, ₹10,000-20,000 = 4, ₹5,000-10,000 = 3, ₹2,000-5,000 = 2, <₹2,000 = 1.
| Customer | R (days) | F (orders/yr) | M (₹) | R-F-M | Segment | Action |
|---|---|---|---|---|---|---|
| A | 15 | 9 | 24,000 | 5-5-5 | Champion | early access, no discount |
| B | 200 | 6 | 14,000 | 2-4-4 | At-risk high value | win-back call + offer |
| C | 25 | 1 | 1,500 | 5-1-1 | New, low value | onboarding, second-order nudge |
| D | 300 | 2 | 3,000 | 1-2-2 | Hibernating | low-cost email only |
| E | 50 | 4 | 8,000 | 4-3-3 | Potential loyalist | cross-sell bundle |
Discounting A wastes margin; B is where the retention budget belongs.
Example 2 - CLV, CAC and payback. AOV ₹1,200, 3 orders a year ⇒ annual revenue ₹3,600; gross margin 40% ⇒ m = ₹1,440 per year. Annual retention r = 0.70, discount rate d = 12%.
- CLV(future years) = 1,440 × 0.70 / (1 + 0.12 − 0.70) = 1,440 × 0.70 / 0.42 = 1,440 × 1.6667 = ₹2,400.
- Including the current year: 1,440 + 2,400 = ₹3,840.
- CAC = ₹900 ⇒ CLV/CAC = 2,400 / 900 = 2.67 (below the 3.0 benchmark on future value; 4.27 if the current year is counted — state the convention).
- Payback = 900 / 1,440 = 0.625 years ≈ 7.5 months.
- Raise retention to 0.80: CLV = 1,440 × 0.80 / 0.32 = ₹3,600, a 50% rise from 10 points of retention — far more than cutting CAC by 10%.
Example 3 - A/B test on checkout. Control 10,000 visitors, 320 orders (3.20%); variant 10,000 visitors, 376 orders (3.76%).
- Absolute lift = 0.56 pp; relative lift = 0.56/3.20 = 17.5%.
- Pooled p̂ = 696/20,000 = 0.0348. SE = √[0.0348 × 0.9652 × (1/10,000 + 1/10,000)] = √[0.033581 × 0.0002] = √6.7162×10⁻⁶ = 0.002592.
- z = 0.0056 / 0.002592 = 2.16, two-sided p ≈ 0.031 ⇒ significant at 5%, not at 1%.
- 95% CI on the difference ≈ 0.0056 ± 1.96 × 0.002592 = 0.05 pp to 1.07 pp — the lower bound is barely above zero.
- Required sample for this MDE: n ≈ 16 × 0.032 × 0.968 / 0.0056² = 0.49562 / 3.136×10⁻⁵ ≈ 15,800 per arm. The test was underpowered; the honest conclusion is "promising, extend to 15,800 per arm", not "17.5% lift confirmed".
Example 4 - platform ROAS vs incremental ROAS. Spend ₹5,00,000 on a retargeting campaign; platform reports ₹30,00,000 attributed revenue ⇒ ROAS = 6.0. A 20% randomised holdout is in place: exposed group 2,00,000 users at ₹18 revenue/user; holdout 50,000 users at ₹15 revenue/user.
- Incremental revenue per user = ₹3 ⇒ incremental revenue = 2,00,000 × 3 = ₹6,00,000.
- iROAS = 6,00,000 / 5,00,000 = 1.2 (not 6.0 — four-fifths of the credited revenue would have happened anyway).
- At 40% contribution margin, incremental profit = 0.40 × 6,00,000 = ₹2,40,000 < ₹5,00,000 spend ⇒ the campaign loses ₹2,60,000. Break-even needs margin-ROAS = 1, i.e. iROAS ≥ 2.5.
Example 5 - basket analysis and a promotion decision. 10,000 transactions: bread in 2,000, butter in 1,500, both in 600.
- Support(bread ∩ butter) = 600/10,000 = 0.06; Confidence(bread→butter) = 600/2,000 = 0.30; P(butter) = 0.15 ⇒ Lift = 0.30/0.15 = 2.0; Leverage = 0.06 − (0.20 × 0.15) = 0.03; Conviction = (1 − 0.15)/(1 − 0.30) = 0.85/0.70 = 1.21.
- A 10% price cut is tested on butter: price ₹500 → ₹450, units 1,000 → 1,150 per week, cost ₹300/unit.
- ε = (+15%)/(−10%) = −1.5. Contribution before = (500 − 300) × 1,000 = ₹2,00,000; after = (450 − 300) × 1,150 = ₹1,72,500 ⇒ the promotion destroys ₹27,500 despite revenue rising from ₹5,00,000 to ₹5,17,500.
- Break-even volume at ₹450: 2,00,000 / 150 = 1,333 units, i.e. +33.3% uplift (ε ≈ −3.33) needed.
- Lerner check: optimal margin ratio = 1/1.5 = 66.7%, but the current margin is 200/500 = 40% ⇒ at ε = −1.5 the indicated move is a price increase, not a discount (valid only locally, as ε is not constant).
Where it is used
- E-commerce and quick commerce (Flipkart, Myntra, Nykaa, Zepto, Blinkit, BigBasket): CLV-based acquisition caps, RFM campaigns, recommendation and basket analytics, A/B tests on app funnels.
- BFSI (HDFC Bank, ICICI, Bajaj Finserv, Policybazaar, insurers): propensity to buy, cross-sell next-best-product, attrition models for cards and SIPs, campaign holdouts under RBI and IRDAI conduct rules.
- FMCG and retail (HUL, ITC, Marico, Dabur, Reliance Retail, DMart): marketing mix modelling on NielsenIQ/Kantar panel data, trade-promotion ROI, price-pack architecture, planogram decisions.
- Telecom, OTT and subscriptions (Jio, Airtel, Vi, Hotstar, Zee5): contractual churn and win-back models, ARPU-mix analysis, plan migration offers.
- Agencies and analytics services (GroupM, Dentsu, Fractal, Mu Sigma, LatentView, ZS, Nielsen): MMM, attribution, brand-lift studies, dashboards for Indian and global clients.
- Job roles: marketing analyst, CRM/retention analyst, growth analyst, product analyst, data scientist (customer science), MMM consultant, martech/CDP analyst — SQL plus Python plus GA4 plus one BI tool is the usual bar for entry.
Interview questions
- Q: What is the difference between CLV and revenue per customer? A: CLV is the discounted future contribution margin expected over the relationship, net of cost of goods and often of service cost; revenue per customer is a historic top-line figure with no margin, retention or discounting in it.
- Q: How would you define churn for an apparel e-commerce site with no subscription? A: Look at the distribution of inter-purchase gaps for repeat buyers and set the window at a high percentile (for example 365 days for apparel); then validate that customers crossing it almost never return.
- Q: Why is recency usually the strongest RFM variable? A: Recent buyers are still in the active state — attention, intent and app presence decay quickly — so recency separates live customers from dormant ones better than lifetime frequency or spend.
- Q: Last-click attribution says search delivers ROAS 8 and display ROAS 0.5. Should display be switched off? A: No. Last-click systematically starves upper-funnel channels; test it with a geo or audience holdout and measure incremental sales before reallocating.
- Q: What is sample ratio mismatch and why does it void a test? A: The observed traffic split differs significantly from the designed split, which means assignment or logging is broken, so the two groups are no longer comparable and the estimated effect is unreliable.
- Q: What is the harm in stopping an A/B test as soon as it turns significant? A: Repeated peeking multiplies the false-positive rate well above 5%; fix the sample size in advance or use a sequential test designed for continuous monitoring.
- Q: Difference between a propensity model and an uplift model for a discount campaign? A: Propensity ranks who is likely to buy, so it often targets people who would have bought anyway; uplift ranks who buys *because of* the offer and avoids sleeping dogs who react badly to contact.
- Q: A rule has 90% confidence but lift 1.0 — is it useful? A: No. Lift 1.0 means the consequent is just very common, so the association carries no information beyond base popularity.
- Q: What do adstock and saturation represent in an MMM? A: Adstock captures advertising carryover into later weeks (a decay parameter λ); saturation captures diminishing returns, so marginal ROI falls as spend rises in a channel.
- Q: Your CLV/CAC is 3.5 but the company is running out of cash. What is missing? A: Payback period. CLV accrues over years while CAC is paid today, so a long payback starves working capital even with a healthy ratio.
- Q: What consent and compliance checks do you run before a promotional SMS campaign in India? A: Verify DPDP-compliant consent for the stated purpose and honour withdrawals, use a TRAI-registered header and approved template, scrub against DND/consent preferences and respect category and time-band rules.
- Q: How would you measure the effect of a loyalty programme already live for everyone? A: With no randomisation, use quasi-experimental methods — difference-in-differences on matched non-members, propensity-score matching, or a staggered rollout/geo holdout for new features — and state the selection-bias caveat.
Common mistakes
- Treating attributed ROAS as causal and reporting it as incremental lift; platform-reported conversions double-count across channels.
- Computing CLV on revenue instead of contribution margin, or omitting the discount rate, which overstates value by a large multiple.
- Mixing blended and paid CAC between slides, or leaving acquisition discounts and agency fees out of CAC.
- Declaring an A/B test winner from an underpowered sample, from a peeked-at mid-run reading, or on a secondary metric chosen after seeing the data.
- Running k-means on unscaled, unlogged monetary features so one variable dominates every cluster, then not profiling clusters on holdout business variables.
- Leaking post-label features (refunds, cancellation tickets, future purchases) into churn or propensity models and reporting the inflated AUC.
- Ignoring cannibalisation and pull-forward in promotion analysis, so a discount that moved sales between SKUs or between weeks is booked as growth.
- Sending campaigns without checking consent, DND and suppression lists — a legal and deliverability failure, not just an analytics one.
Related topics
Statistical inference and hypothesis testing · Supervised learning: classification and regression · Clustering and unsupervised learning · Time series forecasting · Recommender systems · SQL and dashboard reporting for business metrics