Skip to main content

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​

  1. Go to Links and click the link. Its details open, with a QR Code panel.
  2. Choose the style. The preview updates as you go:
    • Dots: Square, Rounded or Dots.
    • Corners: the three large corner squares, Square, Rounded or Circle.
    • Corner color: its own color, or Same color as the dots.
    • Logo: None, your brand kit logo, or Upload… an image just for this link (PNG or JPEG).
    • Background behind the logo: a rounded tile in a color you pick, behind the logo. Use it for a white or light logo, such as one made for a dark Launchpad page, on a normal dark-on-light code.
    • Format (PNG or SVG), Size (256, 512, 1024 or 2048 px), Foreground and Background colors.
  3. Click Download.

To keep the style for this link, click Save for this link. Reset to workspace default removes the link's own design, so its QR code follows the workspace style again. Saving and uploading need permission to edit links; anyone who can see the link can style and download its code. The saved design includes the foreground and background colors. The workspace style has no colors, so a link without a design of its own starts black on white.

If the foreground is lighter than the background, or the contrast between them is under 4:1, the panel warns that the code may not scan. It still lets you download it.

Workspace QR style​

Admins set a style for every QR code in the workspace on Social preview → Brand kit, under QR codes: dots, corners, corner color, whether to show the brand kit logo in the center, and an optional background tile behind it. A preview shows it on your most recent link. Every link without a design of its own uses it, in the dashboard and in the API. Turn it off and QR codes are plain again.

Via API​

Use the link's id, the UUID the links API returns, not its short code.

Generate PNG QR Code​

curl -X GET "https://api.linkforty.com/api/links/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14/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/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14/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/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14/qr?size=512&format=png&color=0066CC" \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
--output qr-code-blue.png

Encoding a specific URL​

By default the QR encodes the link on the platform host. Pass url to encode it on one of the link's other hosts — your workspace's link host or a verified custom domain — with or without a template slug:

curl -X GET "https://api.linkforty.com/api/links/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14/qr?url=https://links.acme.com/promo/abc123" \
--output qr-code.png

The url must be on a host that serves this link and end in the link's short code; anything else is a 400. color and bgcolor take hex colors (0066CC or #0066CC).

Styled QR codes​

These options change how the code is drawn. The encoded URL stays the same, so a styled code goes to the same place as a plain one.

OptionValuesDefault
dotssquare, rounded, dotssquare
cornerssquare, rounded, circlesquare
cornerColorhex color for the three corner squares (and, with dots=dots, the smaller alignment squares)the color value
logonone, brand (your brand kit logo), custom (an image uploaded for the link)none
logoKeywith logo=custom: the key of an image uploaded to this workspace. Omitted, the link's saved logo
logoBackgroundhex color of a rounded tile behind the logo, or none to turn off a saved oneno tile
styleplain: a plain code, whatever style is saved
curl -X GET "https://api.linkforty.com/api/links/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14/qr?format=png&size=1024&dots=dots&corners=rounded&cornerColor=1e6b4a&logo=brand" \
--output qr-code-branded.png

With a logo, the code is built with the highest error correction (level H, about 30% of the data recoverable), and the logo takes a square about 24% of the code's width in the center. If there is no logo to draw (no brand kit logo, or an upload that is gone), the code is drawn without one, and without its tile. A tile sits inside the same square, with a border of the code's background around it so the dots next to it still read cleanly; the logo is drawn a little smaller on it.

Which style a code gets. Each option you pass wins. Options you leave out come from the link's own design if it has one, otherwise from the workspace QR style, otherwise from the defaults above. A request with no style options, for a link with no design in a workspace with no style, returns the same plain code as always. style=plain asks for that plain code whatever is saved.

QR images are served with a one-day browser cache. After you change the workspace style or a link's design, a QR image URL that someone already loaded can show the old style for up to a day. The dashboard always passes every option, so its preview and downloads are never stale.

Send qrDesign when you create or update a link (see Create Link):

curl -X PUT "https://api.linkforty.com/api/links/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14" \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "qrDesign": { "dots": "dots", "corners": "circle", "cornerColor": "#1e6b4a", "logo": "brand" } }'

cornerColor can be null to match the foreground. color and bgcolor (#rrggbb) save the foreground and background; omitted, black on white. A request's own color and bgcolor win over them, and style=plain ignores the whole design, colors included. "qrDesign": null removes the link's design.

To use a logo just for this link, ask for an upload form, post the image to it, then save the returned key as logoKey with "logo": "custom":

curl -X POST "https://api.linkforty.com/api/links/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14/qr-logo/upload-url" \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "mimeType": "image/png" }'
# → { "url": "...", "fields": { ... }, "key": "...", "publicUrl": "..." }

Post the image as a multipart/form-data form to url, with every entry of fields and the image last, as file. PNG or JPEG, up to 4 MB. An upload that isn't saved on a link is deleted two to three hours later. A logoKey from another workspace is refused with a 400.

Programmatic Generation​

JavaScript/TypeScript​

// Generate QR code via API
const response = await fetch(
'https://api.linkforty.com/api/links/7f3c9a52-1b4e-4c8a-9d21-6e0f2a7b3c14/qr?size=512&format=png',
{
headers: { 'Authorization': `Bearer ${API_KEY}` },
}
);

const qrCode = await response.arrayBuffer();

// Save to file (Node.js)
const fs = require('fs');
fs.writeFileSync('qr-code.png', Buffer.from(qrCode));

QR Code Best Practices​

Size Guidelines​

Use CaseRecommended SizeScan Distance
Business cards128-256px4-6 inches
Flyers/brochures256-512px6-12 inches
Posters512-1024px1-3 feet
Billboards2048px+10+ feet
Product packaging256-512px6-12 inches
Table tents512px1-2 feet

Formula: Minimum size = Scan distance / 10

Example: Billboard viewed from 30 feet away needs 3-inch QR code minimum.

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. The downloaded image has a margin of 1 module, so leave more around it in your layout
  • 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:

  1. Print test copy at actual size
  2. Test with multiple devices:
    • iPhone (built-in camera)
    • Android (Google Lens)
    • Older devices
  3. Test in actual lighting conditions
  4. 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:

  1. Go to Links → Find your link
  2. Click "Edit"
  3. Change Original URL or platform URLs
  4. Click "Save"
  5. 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​

  1. User scans QR code from magazine ad
  2. Phone opens camera app → Recognizes QR code
  3. Redirects to short link (lnk.forty.com/abc123)
  4. LinkForty logs click event:
    • Timestamp
    • Location (city/country)
    • Device type (iPhone 14, Pixel 7)
    • Referrer: QR scan
  5. User redirected based on device (App Store, Google Play, web)
  6. User installs app
  7. SDK checks for attribution within attribution window
  8. Install attributed to QR scan

Analytics​

View QR code scan analytics:

Via Dashboard:

  1. Analytics → Select link
  2. 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​

Put your brand kit logo, or a logo uploaded for one link, in the center (see Styled QR codes). LinkForty sizes the logo, clears the modules behind it, and raises error correction to compensate, so you don't need an image editor.

Caution: a logo still uses part of the code's error correction. Scan a printed proof with both an iPhone and an Android phone before a large print run, especially with light colors or small print sizes.

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:

  1. Scan QR code
  2. If app installed → Opens directly to product
  3. If app not installed → App Store/Google Play
  4. 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:

  1. Too small

    • Increase size (512px minimum)
    • Increase print size
  2. Low contrast

    • Use black on white
    • Avoid colored backgrounds
  3. Damaged or distorted

    • Ensure flat surface
    • Check for wrinkles/tears
    • Verify no glare from lighting
  4. No quiet zone

    • Add white space around QR code
    • Minimum 4 modules on all sides
  5. Format issues

    • Use PNG or SVG (not JPEG)
    • Check resolution (300 DPI for print)

Poor Scan Rate​

If scans are lower than expected:

  1. Test visibility

    • Is QR code large enough?
    • Good contrast with background?
    • Proper lighting?
  2. Add call-to-action

    • "Scan for 20% off"
    • "Scan to download app"
    • Include phone icon + text
  3. Placement

    • Eye level preferred
    • Easy to reach
    • Good lighting
    • No obstructions
  4. 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:

  1. Check attribution window

    • May be too short
    • Recommend 7-30 days for print
  2. Improve landing page

    • Clear value proposition
    • Easy download process
    • Fast loading
  3. Platform-specific URLs

    • Ensure iOS/Android URLs set
    • Test on both platforms

Availability​

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

Best Practices Summary​

  1. Size for scan distance: Larger QR codes for farther viewing
  2. Use SVG for print: Scalable, professional quality
  3. High contrast: Black on white works best
  4. Test before printing: Multiple devices, actual conditions
  5. Include call-to-action: Tell users why to scan
  6. Add quiet zone: White space around all edges
  7. Use dynamic codes: Update destination without reprinting
  8. Track with UTM: Know which placements perform best
  9. Set appropriate attribution window: 7-30 days for print
  10. Monitor analytics: Optimize based on scan data

Next Steps​

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.