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: Measure Offline Campaigns',
  description:
    'Use QR code analytics to interpret scan data, compare placements, measure offline campaigns, and decide what to update or reprint next.',
  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: Measure Offline Campaigns"
        description="Use QR code analytics to interpret scan data, compare placements, measure offline campaigns, and decide what to update or reprint next."
        eyebrow="Analytics interpretation"
        intro="QR code analytics turns scan events into decisions: which printed placement worked, which destination needs work, and what should be changed before the next print run."
        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 teams interpret QR scan data by placement, timing, device context, and campaign route so offline marketing decisions are based on evidence rather than raw scan counts alone."
        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: 'Tracking collects scan events',
            text: 'Input data',
            value: true,
          },
          {
            label: 'Analytics explains performance',
            text: 'Decision layer',
            value: true,
          },
          {
            label: 'Reprint decisions',
            text: 'Based on evidence',
            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="Questions QR analytics should answer"
        workflowIntro="The point of analytics is not to produce dashboards for their own sake. It is to decide what to print again, where to place it, and what should happen after the scan."
        workflowCards={[
          {
            title: 'Which placement worked?',
            description:
              'Separate flyer, packaging, sign, event, or service-surface traffic so you know which printed context actually creates useful scan activity.',
          },
          {
            title: 'What should change next?',
            description:
              'Review performance and then improve the destination, offer, or next action without replacing every physical code already in circulation.',
          },
          {
            title: 'What should be reprinted?',
            description:
              'Give marketing, operations, or support teams a clearer view of which physical QR programs deserve another batch.',
          },
        ]}
        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: '/qr-code-for-marketing-campaigns',
            title: 'QR Codes for Marketing Campaigns',
            description:
              'Plan campaign QR workflows around attribution, creative testing, and print distribution.',
          },
          {
            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/utm-parameter-qr-codes',
            title: 'UTM Parameters with QR Codes',
            description:
              'Use GA4 campaign parameters when QR scan data needs to connect to post-scan conversions.',
          },
          {
            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:
              'What is the difference between QR tracking and QR analytics?',
            answer:
              'QR tracking collects scan events. QR analytics interprets those events so teams can compare placements, understand campaign performance, and decide what to update or reprint.',
          },
          {
            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: '/qr-code-for-marketing-campaigns',
            title: 'QR Codes for Marketing Campaigns',
            description:
              'Plan offline campaigns where each placement has a measurable QR route and follow-up action.',
            ctaLabel: 'Measure offline QR campaigns',
          },
          {
            href: '/use-cases/qr-codes-for-review-collection',
            title: 'QR Codes for Review Collection',
            description:
              'Compare receipts, table cards, packaging, and counters as measurable review-request placements.',
            ctaLabel: 'Measure review QR placements',
          },
          {
            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"
      />
    </>
  );
}
