How to Track QR Code Scans

Learn how to set up scan analytics for your QR codes. Track who's scanning, where they're scanning from, and when.

📅 Updated December 2025 ⏱️ 5 min read

QR code analytics help you understand how people interact with your codes. This data is invaluable for marketing campaigns, restaurant menus, event management, and more.

What You Can Track

Dynamic QR codes from QR Code API capture the following data on every scan:

📊

Total Scans

Count
👤

Unique Visitors

Unique IPs
🌍

Location

City/Country
📱

Device Type

iOS/Android
🕐

Time

Timestamp
🔗

Referrer

Source

Setting Up Tracking

Tracking is automatic when you use dynamic QR codes. Here's how to set it up:

Create a Tracked Dynamic Link
const response = await fetch('https://www.qrcodeapi.io/api/links', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Summer Campaign Billboard',
    destinationUrl: 'https://yoursite.com/summer-sale'
  })
});

const link = await response.json();
// Every scan to link.qrUrl is now tracked!

Retrieving Analytics

Fetch analytics for any of your dynamic links:

Get Scan Analytics
const analytics = await fetch(
  `https://www.qrcodeapi.io/api/analytics?linkId=${link.id}`,
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
).then(r => r.json());

console.log(analytics);
// {
//   totalScans: 1247,
//   uniqueVisitors: 892,
//   scans: [
//     {
//       timestamp: '2024-12-15T10:30:00Z',
//       city: 'New York',
//       country: 'US',
//       device: 'iPhone',
//       browser: 'Safari'
//     },
//     ...
//   ]
// }

Dashboard Access

You can also view analytics in your dashboard at qrcodeapi.io/dashboard. The dashboard provides:

Use Cases for Analytics

Marketing ROI

Track which billboards, flyers, or ads drive the most engagement. Compare scan counts across different placements to optimize your marketing spend.

Restaurant Insights

See which tables scan your menu most, identify peak ordering times, and understand customer behavior patterns.

Event Attendance

Track check-ins, session attendance, and engagement across conference days. Know exactly how many people scanned your event materials.

Best Practices

Ready to Track Your QR Codes?

Get started with dynamic QR codes and comprehensive analytics.

Get Your Free API Key