import type { ServiceContent } from "@/content/types";

export const analyticsAttributionService: ServiceContent = {
  slug: "analytics-attribution",
  name: "Analytics + Attribution",
  shortDescription: "GA4, server-side tracking, and CRM revenue attribution.",
  stage: "measure",
  seo: {
    title: "Analytics + Attribution for SaaS + E-commerce",
    description:
      "GA4, Google Tag Manager, server-side tracking, and CRM attribution for SaaS and e-commerce, so spend ties to pipeline, revenue, and margin you can trust.",
  },
  hero: {
    eyebrow: "Analytics + attribution",
    title: "Measurement you can make budget decisions on.",
    intro:
      "We connect ad platforms, GA4, and your CRM or store data, so reports show what spend produced in pipeline, revenue, and margin. Where the data can't answer a question, we say so.",
    outcomes: ["Conversions you can trust", "Spend tied to revenue", "Cleaner bidding signals", "Reports finance accepts"],
  },
  problem: {
    heading: "Why marketing numbers stop adding up.",
    intro:
      "The problem is rarely missing data. It's sources that disagree, with no agreed view of which one should set the budget.",
    items: [
      {
        title: "Conversions counted twice, or not at all",
        description:
          "Browser and server events report the same order twice. Other conversions never register because of blockers, consent choices, or a tag broken by a site release.",
      },
      {
        title: "Attribution read as fact",
        description:
          "Ad platforms, GA4, and the CRM each apply their own model and window, and budget drifts toward the most flattering report.",
      },
      {
        title: "Revenue lives somewhere else",
        description:
          "Pipeline sits in the CRM, subscriptions in Stripe, and refunds in Shopify. Reports stop at checkout or the form fill, so spend never meets revenue.",
      },
      {
        title: "No shared definitions",
        description:
          "Campaign names, UTM tags, and lifecycle stages drift. Marketing, sales, and finance use the same words differently, so reviews start by arguing about the data.",
      },
    ],
  },
  approach: {
    heading: "How we set up measurement.",
    intro: "We start from the decisions your team has to make, then build the tracking those decisions depend on.",
    steps: [
      {
        title: "Define the decisions first",
        description:
          "We list the budget, channel, and offer decisions the business makes and the metric each one needs. The tracking plan starts there, not with every click.",
      },
      {
        title: "Design events around the funnel",
        description:
          "GA4 events mirror real stages, from lead and trial to opportunity, purchase, and refund, with names that follow one convention.",
      },
      {
        title: "Collect closer to the source",
        description:
          "Server-side tagging, conversions APIs, and offline conversion imports send key events from your server or CRM, deduplicated so each conversion counts once.",
      },
      {
        title: "Build consent into the setup",
        description:
          "Tags respect consent choices before they fire. Where consent limits measurement, reports show which figures are observed and which are modeled.",
      },
      {
        title: "Treat attribution as an estimate",
        description:
          "Attribution models estimate credit, and none of them proves cause. We compare them with CRM or store revenue before any model shapes the budget.",
      },
    ],
  },
  deliverables: {
    heading: "What's included.",
    intro: "Scope depends on your stack and where the data breaks. Common pieces:",
    items: [
      {
        title: "Measurement audit and tracking plan",
        description: "A review of tags, events, and gaps, plus a plan for what to track and why.",
      },
      {
        title: "GA4 and Google Tag Manager setup",
        description: "Events and conversions deployed through containers with naming rules and consent-aware triggers.",
      },
      {
        title: "Server-side tagging and conversions APIs",
        description: "Key events sent from your server to GA4 and ad platforms, deduplicated against browser tags.",
      },
      {
        title: "CRM attribution and offline imports",
        description: "Source data carried through HubSpot or Salesforce stages and sent back to ad platforms.",
      },
      {
        title: "UTM and naming governance",
        description: "A shared convention for campaigns, sources, and mediums, checked before each launch.",
      },
      {
        title: "Revenue reconciliation",
        description: "Tracked conversions compared with Shopify orders or Stripe payments, with the gaps explained.",
      },
      {
        title: "Commercial dashboards",
        description: "Dashboards in your BI tool that open with CAC, MER, pipeline, and margin.",
      },
      {
        title: "Incrementality test design",
        description: "Holdout and geo test plans for questions attribution can't settle, with limits stated up front.",
      },
    ],
  },
  applications: {
    heading: "Where the truth lives depends on the model.",
    intro:
      "SaaS revenue is confirmed in the CRM, often long after the click. E-commerce revenue is confirmed at checkout, then revised by returns.",
    saas: {
      summary: "For SaaS, measurement follows a click to closed-won, so CAC and payback reflect revenue, not form fills.",
      points: [
        "Source and campaign data captured on forms and stored in the CRM",
        "HubSpot or Salesforce lifecycle and opportunity stages mapped to reports",
        "Qualified stages imported to Google Ads, Microsoft Ads, Meta, and LinkedIn",
        "Stripe subscription data joined to trial events in your data warehouse",
        "CAC payback and pipeline velocity reported by channel and segment",
      ],
    },
    ecommerce: {
      summary: "For e-commerce, measurement reconciles platform claims with store orders, so MER is built on real revenue.",
      points: [
        "Purchase events checked against Shopify orders, refunds, and returns",
        "Browser and server purchase events deduplicated by order ID",
        "New and returning customers split, so repeat buyers don't flatter CAC",
        "MER and new-customer CAC reported beside platform ROAS",
        "Geo or holdout tests for brand search and retargeting spend",
      ],
    },
  },
  process: {
    heading: "From broken tags to trusted reports.",
    intro: "Measurement work runs in a fixed order. Polishing reports before fixing collection only makes wrong numbers easier to read.",
    steps: [
      {
        title: "Audit",
        description: "We trace key conversions from click to CRM or store and log every gap and duplicate.",
      },
      {
        title: "Plan",
        description: "We agree on definitions, events, and attribution rules in a tracking plan your team approves.",
      },
      {
        title: "Implement",
        description: "We build tags, server events, and CRM fields, then test each one against real transactions.",
      },
      {
        title: "Reconcile",
        description: "We compare reported numbers with CRM and store records, and document what differs and why.",
      },
      {
        title: "Report and test",
        description: "Dashboards go live, and incrementality tests run where attribution can't answer the budget question.",
      },
    ],
  },
  measurement: {
    heading: "How we judge measurement quality.",
    intro: "Good measurement shows up as better decisions, so we check it from the top down.",
    tiers: [
      {
        tier: "Business outcome",
        summary: "What the business can now see.",
        metrics: [
          { title: "Pipeline by source", description: "SaaS: opportunity value traced to channel and campaign." },
          { title: "Revenue by source", description: "E-commerce: orders and margin traced to channel, net of refunds." },
          { title: "Incremental lift", description: "Revenue caused by spend, estimated with holdout or geo tests." },
        ],
      },
      {
        tier: "Efficiency",
        summary: "What growth costs, counted cleanly.",
        metrics: [
          { title: "CAC and payback", description: "Acquisition cost by channel, built from CRM or order data." },
          { title: "MER", description: "Total revenue divided by total marketing spend, reconciled to the store." },
          { title: "Cost per opportunity", description: "SaaS: spend divided by opportunities created, not raw leads." },
        ],
      },
      {
        tier: "Diagnostic",
        summary: "Whether the data holds up.",
        metrics: [
          { title: "Reconciliation gap", description: "Tracked conversions compared with CRM or store records." },
          { title: "Duplicate conversions", description: "Events counted more than once across browser and server." },
          { title: "Unattributed traffic", description: "Sessions and leads with missing or broken source data." },
        ],
      },
    ],
  },
  faqs: [
    {
      question: "Which attribution model should we use?",
      answer:
        "Treat every model as an estimate. Last click, first click, and algorithmic models each assign credit their own way and favor some channels. We use a working model for daily optimization, check it against CRM or store revenue, and test incrementality where a large budget rides on the answer. See our [attribution readiness guide](/resources/attribution-readiness-guide).",
    },
    {
      question: "Why doesn't GA4 match our Shopify orders?",
      answer:
        "They count different things. Shopify records every order. GA4 records a purchase only when a tag fires, consent allows it, and the browser reaches the confirmation step. Some gap is normal. We measure it, fix what broken or duplicate tracking causes, and label the rest.",
    },
    {
      question: "Do we need server-side tracking?",
      answer:
        "Not always. Server-side tagging helps when browser tags miss events, when conversions happen off the site, or when you need tighter control over shared data. It adds hosting costs and upkeep and must still respect consent. We recommend it when the gap it closes is worth the effort.",
    },
    {
      question: "Can you connect ad spend to HubSpot or Salesforce pipeline?",
      answer:
        "Yes. We capture source data on forms, store it on the contact and opportunity, and map lifecycle stages through to closed-won. Qualified stages then go back to ad platforms as offline conversions, so bidding learns from pipeline, not form fills. See [SaaS growth marketing](/saas-marketing).",
    },
    {
      question: "How do you test whether a channel is incremental?",
      answer:
        "With a controlled comparison. A holdout withholds a campaign from a random group. A geo test changes spend in some regions and compares them with similar ones. Both need volume and carry a margin of error, so we save them for expensive decisions. Our [MER vs ROAS guide](/resources/mer-vs-roas-guide) covers when to trust platform numbers.",
    },
  ],
  related: {
    services: ["paid-media", "paid-social", "cro"],
    resources: ["attribution-readiness-guide", "saas-cac-benchmarking-guide"],
  },
};
