Skip to content

Immortal Time Bias

Immortal Time Bias occurs in observational studies when the follow-up period includes time where the outcome cannot happen. This inflates the perceived treatment effect.

Three platforms, three answers, one budget to defend. Your GA4 export already holds the answer, and the first finding is free and never leaves your browser. Get your first finding free

By , Founder & CEOUpdated 4 min read

What are Immortal Time Bias?

Immortal Time Bias is a specific type of bias that arises in observational studies when a period of 'immortal time', a span during which the outcome of interest cannot occur, is incorrectly classified or included in the analysis. Technically, immortal time refers to the time interval between study entry and the initiation of a treatment or exposure, during which the subject is 'immortal' with respect to the outcome (e.g., death cannot occur before treatment starts). If this time is misclassified as exposed, it leads to an overestimation of the treatment effect.

In the context of ecommerce marketing attribution, immortal time bias can manifest when evaluating the impact of time-varying marketing interventions, such as discount campaigns, retargeting ads, or loyalty program enrollments, on customer behaviors like repeat purchases or lifetime value. For example, if an analyst incorrectly includes the time before a customer first engages with a retargeting campaign as part of the 'exposed' period, they risk attributing natural customer retention or delayed purchases to the campaign effect. This misclassification inflates the measured ROI of marketing activities.

Why Immortal Time Bias matter for ecommerce

For ecommerce marketers, understanding and addressing immortal time bias is critical to accurately measuring the effectiveness of marketing activities that unfold over time, such as subscription sign-ups, flash sales, or influencer collaborations. Misestimating the impact of these campaigns can lead to overspending on ineffective channels or underinvesting in high-performing ones, directly impacting ROI. For instance, a fashion brand using Shopify that fails to correct for immortal time bias can believe a retargeting campaign doubled repeat purchases, when in reality, part of the uplift occurred before the campaign started. This leads to distorted budget allocation and lost competitive advantage. Ultimately, correcting for immortal time bias helps marketers to make data-driven decisions, maximize campaign ROI, and sustainably outpace competitors in highly dynamic online retail environments.

How to use Immortal Time Bias

  1. Identify Time-Varying Treatments: Begin by cataloging all marketing interventions with start dates and durations, such as promotional emails, retargeting ads, or loyalty program enrollments.
  2. Define Exposure Windows Accurately: Ensure that only the periods when customers are actually exposed to these treatments are considered 'treated' time. Avoid including pre-exposure periods where outcomes cannot be attributed to the treatment.
  3. Segment Customer Data by Exposure Status: Separate cohorts into 'exposed' and 'unexposed' groups based on treatment start times, and exclude immortal time from the exposed group's follow-up period.
  4. Validate Results with Sensitivity Analyses: Run falsification tests or use negative control outcomes to ensure that immortal time bias is minimized.
  5. Integrate with Analytics Platforms: Connect your cleaned, unbiased attribution data with Shopify reports or Google Analytics to inform budgeting and campaign improvement.

Common mistakes

  1. Including Pre-Treatment Periods in Exposure: Treating the entire follow-up period as exposed, including the time before a customer actually received a marketing message, inflates measured effects. Avoid this by strictly segmenting exposure windows.
  2. Ignoring Time-Varying Nature of Treatments: Analyzing marketing campaigns as static exposures rather than dynamic, time-bound events leads to bias. Use causal inference models that handle time-varying treatments.
  3. Failing to Adjust for Confounders: Not controlling for factors like customer demographics or purchase history during immortal time can confound results. Incorporate relevant covariates in models.
  4. Relying Solely on Naive Attribution Models: Using last-click or simple rule-based attributions ignores timing and can perpetuate immortal time bias.
  5. Overlooking Validation Steps: Skipping sensitivity analyses or falsification tests can leave immortal time bias undetected. Always validate your findings with reliable checks.

Frequently asked questions

  • How does immortal time bias affect e-commerce marketing attribution?
    Immortal time bias can cause overestimation of a marketing campaign's effectiveness by incorrectly including periods before a customer was exposed to the campaign. This leads to misleading ROI calculations and poor budget allocation.
  • Can immortal time bias occur with retargeting ads?
    Yes. If the period before a user first sees a retargeting ad is counted as exposed time, any purchases made during that period inflate the ad's perceived impact, introducing immortal time bias.
  • Is immortal time bias relevant only to medical studies?
    No. While first identified in medical studies, immortal time bias is relevant to any observational study with time-varying treatments, including ecommerce marketing where customer exposure timing impacts outcomes.
  • What are best practices to avoid immortal time bias in e-commerce data?
    Best practices include clearly defining treatment start times, using time-sensitive causal models, controlling for confounders, and validating results with sensitivity analyses to ensure unbiased attribution.

Your platforms guess.
We run the math.

Upload a GA4 export and see what each channel caused, next to last-click, in 1–2 minutes. The read is yours to keep.

The free finding runs in your browser. Your file never leaves it. The full read is €99, refundable within 30 days, no questions asked. Prices exclude VAT.