QR Codes
Generate dynamic QR codes for your short links to enable offline-to-online attribution tracking.
Overview
LinkForty's QR code generation allows you to create scannable codes for print materials, product packaging, event signage, and more. Unlike static QR codes, LinkForty QR codes are dynamic - you can update the destination URL without reprinting the code.
Key Features:
- ✅ Dynamic QR codes (update destination anytime)
- ✅ Multiple formats (PNG, SVG)
- ✅ Custom sizes (128px - 2048px)
- ✅ Brand colors support
- ✅ Full attribution tracking
- ✅ Click analytics by scan location
Why QR Codes?
Offline-to-Online Attribution
Track how offline marketing drives app installs:
Traditional Approach:
- Print ad with URL → Hard to type → Low conversion
- No way to track which magazine/billboard drove installs
LinkForty QR Codes:
- User scans code → Instant redirect → Higher conversion
- Full attribution: which print ad, when scanned, where installed
- Track ROI on offline marketing spend
Use Cases
Print Advertising:
- Magazine ads
- Newspaper inserts
- Direct mail
- Flyers and brochures
Product Packaging:
- Product boxes
- Instruction manuals
- Warranty cards
- Recipe cards
Retail & Events:
- In-store displays
- Event posters
- Conference badges
- Table tents at restaurants
Business Materials:
- Business cards
- Letterhead
- Invoices
- Presentations
Generating QR Codes
Via Dashboard
Step 1: Navigate to Link
- Go to Links page
- Click on the link you want to create a QR code for
- Click "Generate QR Code" button
Step 2: Configure Options
Size:
- 128x128px - Small (business cards)
- 256x256px - Medium (flyers)
- 512x512px - Large (posters)
- 1024x1024px - Print quality
- 2048x2048px - Billboard/large format
Format:
- PNG - Raster image (photos, web)
- SVG - Vector image (print, scalable)
Color:
- Black (default)
- Custom hex color (#FF0000)
- Match your brand colors
Step 3: Download
Click "Download" and save the file.
Via API
Generate PNG QR Code
curl -X GET "https://api.linkforty.com/api/links/abc123/qr?size=512&format=png" \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
--output qr-code.png
Generate SVG QR Code
curl -X GET "https://api.linkforty.com/api/links/abc123/qr?size=1024&format=svg" \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
--output qr-code.svg
With Custom Color
curl -X GET "https://api.linkforty.com/api/links/abc123/qr?size=512&format=png&color=0066CC" \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
--output qr-code-blue.png
Programmatic Generation
JavaScript/TypeScript
import { LinkFortySDK } from '@linkforty/sdk';
const client = new LinkFortySDK({
apiKey: process.env.LINKFORTY_API_KEY
});
// Generate QR code
const qrCode = await client.links.generateQR('abc123', {
size: 512,
format: 'png',
color: '000000'
});
// Save to file
await fs.writeFile('qr-code.png', qrCode);
Python
from linkforty import LinkForty
client = LinkForty(api_key=os.environ['LINKFORTY_API_KEY'])
# Generate QR code
qr_code = client.links.generate_qr(
'abc123',
size=512,
format='png',
color='000000'
)
# Save to file
with open('qr-code.png', 'wb') as f:
f.write(qr_code)
QR Code Best Practices
Size Guidelines
| Use Case | Recommended Size | Scan Distance |
|---|---|---|
| Business cards | 128-256px | 4-6 inches |
| Flyers/brochures | 256-512px | 6-12 inches |
| Posters | 512-1024px | 1-3 feet |
| Billboards | 2048px+ | 10+ feet |
| Product packaging | 256-512px | 6-12 inches |
| Table tents | 512px | 1-2 feet |
Formula: Minimum size = Scan distance / 10
Example: Billboard viewed from 30 feet away needs 3-inch QR code minimum.
Print Quality
For Professional Printing:
- Use SVG format (vector, scales infinitely)
- Or use PNG at 300 DPI minimum
- Size: 1024px or larger
- Include "quiet zone" (white space) around QR code
Quiet Zone:
- Minimum 4 modules (squares) of white space on all sides
- No text, images, or colors in quiet zone
- Essential for reliable scanning
Color Considerations
Safe Color Combinations:
- Dark QR code on light background (best contrast)
- Black on white (highest reliability)
- Dark blue/red/green on white
Avoid:
- Light colors on dark backgrounds
- Low contrast combinations
- Inverted colors (white QR on black)
- Gradient fills
Contrast Ratio:
- Minimum 3:1 ratio required
- 7:1 ratio recommended for best results
Testing
Always test QR codes before printing:
- Print test copy at actual size
- Test with multiple devices:
- iPhone (built-in camera)
- Android (Google Lens)
- Older devices
- Test in actual lighting conditions
- Test from expected scan distance
Dynamic QR Codes
What Makes Them Dynamic?
Static QR Code:
- URL encoded directly in QR pattern
- Cannot be changed after creation
- Reprint required for new destination
LinkForty Dynamic QR Code:
- QR contains short link (lnk.forty.com/abc123)
- Short link redirects to your destination
- Update destination anytime without reprinting
Updating Destination
Update where QR code sends users without reprinting:
Via Dashboard:
- Go to Links → Find your link
- Click "Edit"
- Change Original URL or platform URLs
- Click "Save"
- QR code now redirects to new destination
Via API:
curl -X PUT https://api.linkforty.com/api/links/abc123 \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"originalUrl": "https://example.com/new-product"
}'
Use Cases:
- Seasonal campaigns (update for new season)
- Product updates (new product pages)
- Event changes (venue or schedule updates)
- A/B testing (test different landing pages)
Attribution Tracking
How It Works
- User scans QR code from magazine ad
- Phone opens camera app → Recognizes QR code
- Redirects to short link (lnk.forty.com/abc123)
- LinkForty logs click event:
- Timestamp
- Location (city/country)
- Device type (iPhone 14, Pixel 7)
- Referrer: QR scan
- User redirected based on device (App Store, Google Play, web)
- User installs app
- SDK checks for attribution within attribution window
- Install attributed to QR scan
Analytics
View QR code scan analytics:
Via Dashboard:
- Analytics → Select link
- View metrics:
- Total scans
- Scans by location
- Scans by device
- Time of day distribution
- Conversion rate (scans → installs)
Example Insights:
Magazine QR Code (June 2024)
- Total scans: 2,456
- Top cities: New York (412), Los Angeles (298), Chicago (187)
- Peak time: 7-9 PM weekdays
- iOS: 62%, Android: 38%
- Installs: 421 (17.1% conversion rate)
UTM Parameters
Track which print materials perform best:
# Magazine ad
curl -X POST https://api.linkforty.com/api/links \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "template_123",
"originalUrl": "https://example.com/promo",
"customCode": "magazine-june",
"utmParameters": {
"utm_source": "vogue_magazine",
"utm_medium": "print",
"utm_campaign": "summer_2024",
"utm_content": "full_page_ad"
}
}'
Analytics breakdown:
- Vogue magazine: 1,200 scans
- Elle magazine: 800 scans
- Local paper: 456 scans
Performance metrics:
Scans: 1,200
Installs: 204
Conversion rate: 17%
Advanced Techniques
Branded QR Codes
Add logo in center (reduces scan reliability slightly):
- Generate QR code at 1024px+
- Open in image editor
- Place logo in center (max 20% of QR size)
- Ensure logo has white border
- Test thoroughly
Caution: QR codes have error correction (30% max), but logos reduce reliability.
Custom URL Schemes
Deep link directly into specific app sections:
{
"originalUrl": "https://example.com/product/123",
"iosUrl": "yourapp://product/123",
"androidUrl": "yourapp://product/123"
}
User flow:
- Scan QR code
- If app installed → Opens directly to product
- If app not installed → App Store/Google Play
- After install → Deferred deep link to product
Location-Specific QR Codes
Create unique QR codes per location:
# Store #1 - New York
{
"customCode": "store-nyc",
"utmContent": "store_nyc"
}
# Store #2 - Los Angeles
{
"customCode": "store-la",
"utmContent": "store_la"
}
Analytics show:
- Which stores drive most scans
- Which locations have highest conversion
- Geographic performance comparison
Expiring QR Codes
For time-limited campaigns:
{
"customCode": "summer-sale-2024",
"expiresAt": "2024-08-31T23:59:59Z"
}
After expiration, QR code shows "This promotion has ended."
Troubleshooting
QR Code Won't Scan
Possible causes:
-
Too small
- Increase size (512px minimum)
- Increase print size
-
Low contrast
- Use black on white
- Avoid colored backgrounds
-
Damaged or distorted
- Ensure flat surface
- Check for wrinkles/tears
- Verify no glare from lighting
-
No quiet zone
- Add white space around QR code
- Minimum 4 modules on all sides
-
Format issues
- Use PNG or SVG (not JPEG)
- Check resolution (300 DPI for print)
Poor Scan Rate
If scans are lower than expected:
-
Test visibility
- Is QR code large enough?
- Good contrast with background?
- Proper lighting?
-
Add call-to-action
- "Scan for 20% off"
- "Scan to download app"
- Include phone icon + text
-
Placement
- Eye level preferred
- Easy to reach
- Good lighting
- No obstructions
-
Educate users
- Some users don't know how to scan
- Add brief instructions
- "Point camera at code to scan"
Scans But No Installs
If scans are high but installs are low:
-
Check attribution window
- May be too short
- Recommend 7-30 days for print
-
Improve landing page
- Clear value proposition
- Easy download process
- Fast loading
-
Platform-specific URLs
- Ensure iOS/Android URLs set
- Test on both platforms
Platform Comparison
LinkForty QR Codes
All tiers (Free, Pro, Self-hosted):
- ✅ Unlimited QR code generation
- ✅ All sizes and formats (PNG, SVG)
- ✅ Custom colors and branding
- ✅ Dynamic updates (change destination without reprinting)
- ✅ Full analytics and attribution
Other Platforms
Generic QR Code Generators:
- Free tools: Static only (can't update after printing)
- Dynamic services: Per-code fees or subscriptions
Enterprise Attribution Platforms:
- Often a separate product or add-on
- Typically limited to enterprise tiers
- May have limited customization options
LinkForty Advantage: ✅ Included in all tiers, unlimited, fully featured
Best Practices Summary
- Size for scan distance: Larger QR codes for farther viewing
- Use SVG for print: Scalable, professional quality
- High contrast: Black on white works best
- Test before printing: Multiple devices, actual conditions
- Include call-to-action: Tell users why to scan
- Add quiet zone: White space around all edges
- Use dynamic codes: Update destination without reprinting
- Track with UTM: Know which placements perform best
- Set appropriate attribution window: 7-30 days for print
- Monitor analytics: Optimize based on scan data
Next Steps
- 📋 Create Links - Generate links for QR codes
- 📊 Analytics - Track QR code performance
- 🎯 UTM Parameters - Set up campaign tracking
- 🔧 API Reference - Automate QR generation
Examples
Restaurant Menu QR Code
{
"customCode": "menu",
"originalUrl": "https://restaurant.com/menu",
"iosUrl": "https://apps.apple.com/app/restaurant/id123",
"androidUrl": "https://play.google.com/store/apps/details?id=com.restaurant",
"utmParameters": {
"utm_source": "table_tent",
"utm_medium": "qr_code",
"utm_campaign": "digital_menu"
}
}
Generate 512px PNG, print on table tents. Track which tables drive most app downloads.
Product Packaging QR Code
{
"customCode": "product-guide",
"originalUrl": "https://example.com/setup-guide",
"utmParameters": {
"utm_source": "product_packaging",
"utm_medium": "qr_code",
"utm_campaign": "setup_assistance",
"utm_content": "box_insert"
}
}
Generate 256px SVG, print on instruction card. Track how many users scan for setup help.
Event Badge QR Code
{
"customCode": "conference-2024",
"originalUrl": "https://event.com/schedule",
"utmParameters": {
"utm_source": "conference_badge",
"utm_medium": "qr_code",
"utm_campaign": "conference_2024"
},
"expiresAt": "2024-06-30T23:59:59Z"
}
Generate 256px PNG, print on badges. Link expires after event ends.