import type { Metadata } from "next";

import {
  buildUseCaseMetadata,
  UseCasePageTemplate,
} from "@/components/marketing/UseCasePageTemplate";
import { GrowthLinksSection } from "@/components/marketing/GrowthLinksSection";

export const metadata: Metadata = buildUseCaseMetadata({
  title: "QR Code Analytics",
  description:
    "Measure QR code scans by placement, timing, device context, and campaign route so offline workflows become reportable.",
  canonicalPath: "/qr-code-analytics",
});

const softwareSchema = {
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "@id": "https://www.qrmaster.net/qr-code-analytics#software",
  name: "QR Master - QR Code Analytics",
  applicationCategory: "BusinessApplication",
  operatingSystem: "Web Browser",
  offers: {
    "@type": "Offer",
    price: "0",
    priceCurrency: "USD",
    availability: "https://schema.org/InStock",
  },
  description:
    "QR analytics software for measuring scans by placement, timing, device context, and offline campaign routing.",
  featureList: [
    "Placement-level scan reporting",
    "Device and timing context",
    "Offline-to-online campaign attribution",
    "Scan visibility across print workflows",
    "Destination updates without reprinting",
  ],
};

export default function QRCodeAnalyticsPage() {
  return (
    <>
    <UseCasePageTemplate
      title="QR Code Analytics"
      description="Measure QR code scans by placement, timing, device context, and campaign route so offline workflows become reportable."
      eyebrow="Analytics"
      intro="QR code analytics matters when a scan is not just a click, but evidence that a sign, flyer, package, or service prompt is doing its job in the real world."
      pageType="commercial"
      cluster="qr-analytics"
      useCase="qr-analytics"
      breadcrumbs={[
        { name: "Home", url: "/" },
        { name: "QR Code Analytics", url: "/qr-code-analytics" },
      ]}
      answer="QR code analytics helps you understand which printed placements, campaigns, and post-scan routes generate useful activity so you can improve what gets reprinted, redistributed, or scaled next."
      whenToUse={[
        "You need more than raw scan counts from campaigns, packaging, or offline placements.",
        "You want to compare where scans happen and which printed surfaces actually drive action.",
        "You need a clearer bridge between QR scans and business outcomes such as signup, offers, or support engagement.",
      ]}
      comparisonItems={[
        { label: "Placement visibility", text: "Usually blended", value: true },
        { label: "Post-print reporting", text: "Weak", value: true },
        { label: "Campaign comparison", text: "Manual or partial", value: true },
      ]}
      howToSteps={[
        "Create QR flows that map to real placements or workflow contexts instead of one generic code for every use case.",
        "Track scans with enough context to compare signs, flyers, inserts, or support surfaces cleanly.",
        "Use the reporting to decide which destinations, offers, or print placements deserve the next round of investment.",
      ]}
      primaryCta={{
        href: "/signup",
        label: "Start measuring QR scans",
      }}
      secondaryCta={{
        href: "/use-cases",
        label: "Browse measured workflows",
      }}
      workflowTitle="What useful QR analytics should help you answer"
      workflowIntro="The point of analytics is not to produce dashboards for their own sake. It is to make better decisions about what to print again, where to place it, and what happens after the scan."
      workflowCards={[
        {
          title: "Placement comparison",
          description:
            "Separate flyer, packaging, sign, event, or service-surface traffic so you know which printed context actually creates useful scan activity.",
        },
        {
          title: "Post-print flexibility",
          description:
            "Review performance and then improve the destination, offer, or next action without replacing every physical code already in circulation.",
        },
        {
          title: "Operational reporting",
          description:
            "Give marketing, operations, or support teams a better view of what physical QR programs are doing once they are live in the field.",
        },
      ]}
      checklistTitle="QR analytics checklist"
      checklist={[
        "Define which placements or workflow surfaces should be compared before launching the QR program.",
        "Use naming or routing that lets scans be grouped by real business context, not only by one generic campaign.",
        "Make the first post-scan step relevant enough that a scan can become a useful action, not a bounce.",
        "Review analytics before reprinting so the next batch reflects real-world performance.",
      ]}
      supportLinks={[
        {
          href: "/use-cases/packaging-qr-codes",
          title: "Use case: Packaging QR Codes",
          description:
            "See how packaging scans can become a measurable post-purchase signal instead of a blind spot.",
        },
        {
          href: "/use-cases/flyer-qr-codes",
          title: "Use case: Flyer QR Codes",
          description:
            "Useful when scan performance needs to be reviewed by distribution point or campaign wave.",
        },
        {
          href: "/blog/trackable-qr-codes",
          title: "Trackable QR Codes",
          description:
            "Support article for understanding what measurable QR setups should capture and why it matters.",
        },
      ]}
      faq={[
        {
          question: "What can QR code analytics show?",
          answer:
            "QR code analytics can show scan activity by placement, time, device context, and campaign route so teams can see which physical programs are actually performing.",
        },
        {
          question: "Why are QR code analytics useful for offline campaigns?",
          answer:
            "They help turn offline placements such as flyers, packaging, signs, or event materials into something measurable instead of relying on assumptions about what worked.",
        },
        {
          question: "Do I need dynamic QR codes for analytics?",
          answer:
            "In most cases yes, because analytics usually depends on a managed redirect or reporting layer that also lets you update destinations without reprinting.",
        },
      ]}
      schemaData={[softwareSchema]}
    />
    <GrowthLinksSection
      eyebrow="Related workflows"
      title="Analytics is only the start"
      description="Tracking scans is more useful when it connects to destination flexibility, campaign comparison, and cost planning."
      links={[
        {
          href: '/qr-code-tracking',
          title: 'QR Code Tracking',
          description: 'See device, time, and location context for every scan. Understand which placements drive real activity.',
          ctaLabel: 'Track QR code scans',
        },
        {
          href: '/dynamic-qr-code-generator',
          title: 'Dynamic QR Code Generator',
          description: 'Create QR codes with updatable destinations so analytics can inform what to change — without reprinting.',
          ctaLabel: 'Create dynamic QR code',
        },
        {
          href: '/reprint-calculator',
          title: 'Reprint Cost Calculator',
          description: 'Calculate how much static reprints are costing vs one dynamic QR subscription.',
          ctaLabel: 'Calculate reprint savings',
        },
        {
          href: '/pricing',
          title: 'Compare Plans',
          description: 'See which plan gives you the scan volume, analytics depth, and QR code count your workflows need.',
          ctaLabel: 'Compare plans',
        },
      ]}
      pageType="commercial"
      cluster="qr-analytics"
    />
  </>
  );
}
