198 lines
11 KiB
JavaScript
198 lines
11 KiB
JavaScript
const fs = require('fs');
|
|
const file = 'src/lib/growth-pages.ts';
|
|
let content = fs.readFileSync(file, 'utf8');
|
|
|
|
const newGymFaq = ` faq: [
|
|
{
|
|
question: 'How do I prevent members from peeling off QR codes on gym equipment?',
|
|
answer: 'Use heavy-duty, commercial-grade vinyl stickers with strong adhesive. Place them on flat, metal surfaces away from where members typically grip the machines. Polycarbonate overlays can also prevent peeling and scratching.'
|
|
},
|
|
{
|
|
question: 'Should gym equipment QR codes link to YouTube or a custom video player?',
|
|
answer: 'While YouTube is easy, an unlisted Vimeo video or a custom video player on your own domain is better. This prevents competitors\\' ads from playing before the tutorial and keeps members focused on their workout.'
|
|
},
|
|
{
|
|
question: 'Can I track which machines are most popular using QR codes?',
|
|
answer: 'Yes! By using a unique dynamic QR code for each machine, you can track scan frequency in your dashboard. High scan rates usually indicate high usage, helping you decide which equipment to buy more of in the future.'
|
|
},
|
|
{
|
|
question: 'Do I need separate QR codes for iOS and Android users to download my gym app?',
|
|
answer: 'No. You can create a single dynamic App Store QR code that detects the user\\'s device and automatically routes iPhones to the Apple App Store and Androids to the Google Play Store.'
|
|
},
|
|
{
|
|
question: 'How do QR codes help with 24/7 contactless gym signups?',
|
|
answer: 'You can place a large QR code on your front window. When scanned, it routes prospects to a mobile signup form and waiver. Once completed, your system can automatically issue a temporary digital access pass to their phone.'
|
|
},
|
|
{
|
|
question: 'What happens if we replace a machine with a newer model?',
|
|
answer: 'If you use dynamic QR codes, you don\\'t need to change the physical sticker if you transfer it. Alternatively, if you apply a new sticker, you can just redirect the old QR code URL to the new machine\\'s tutorial video.'
|
|
}
|
|
],`;
|
|
|
|
const newRealEstateFaq = ` faq: [
|
|
{
|
|
question: 'How can I reuse expensive real estate yard signs for multiple listings?',
|
|
answer: 'By printing a dynamic QR code directly onto your metal or plastic yard sign. When a house sells, you move the sign to a new property and simply log into your dashboard to change the QR code\\'s destination URL to the new listing.'
|
|
},
|
|
{
|
|
question: 'How large should a QR code be on a real estate sign for easy scanning from a car?',
|
|
answer: 'To be scannable from a vehicle parked at the curb (about 10-15 feet away), the QR code should be at least 4x4 inches (10x10 cm). Ensure there is high contrast, like a black code on a white background.'
|
|
},
|
|
{
|
|
question: 'What is the best destination for an open house QR code?',
|
|
answer: 'Instead of a static PDF flyer, link to a mobile-optimized digital property brochure or a lead-capture form. This allows you to collect the contact information of interested buyers instantly before they leave the property.'
|
|
},
|
|
{
|
|
question: 'Can a QR code automatically save my agent contact details to a buyer\\'s phone?',
|
|
answer: 'Yes. You can create a vCard QR code. When scanned, it prompts the buyer\\'s smartphone to instantly add your name, phone number, email, and photo directly to their contacts app.'
|
|
},
|
|
{
|
|
question: 'Will real estate QR codes work if there is no cell service at the property?',
|
|
answer: 'A standard URL QR code requires an internet connection to load the property page. If you are selling rural properties with no cell service, consider using an offline PDF QR code or a vCard QR code, which encode the data directly into the matrix.'
|
|
},
|
|
{
|
|
question: 'Can I track which neighborhoods generate the most interest?',
|
|
answer: 'Absolutely. If you use different dynamic QR codes for signs in different neighborhoods, your analytics dashboard will show you exactly which signs are getting scanned the most, helping you focus your marketing efforts.'
|
|
}
|
|
],`;
|
|
|
|
const newEventsFaq = ` faq: [
|
|
{
|
|
question: 'How do dynamic QR codes prevent disaster if our event schedule changes?',
|
|
answer: 'If a speaker cancels or a room changes after you\\'ve printed 5,000 attendee badges, a dynamic QR code saves the day. You simply update the digital schedule URL in your dashboard, and everyone\\'s printed badge instantly points to the new information.'
|
|
},
|
|
{
|
|
question: 'How do I generate unique QR codes for thousands of attendee badges?',
|
|
answer: 'You can use a Bulk QR Code Generator. Simply upload a CSV file with your attendees\\' names and unique URLs (like their individual networking profiles or ticket IDs), and the system will generate a batch of unique QR codes for your badge printer.'
|
|
},
|
|
{
|
|
question: 'Can sponsors use QR codes to capture leads at their booths?',
|
|
answer: 'Yes, this is highly effective. Sponsors can display a QR code linking to a digital brochure or a lead capture form. When attendees scan it, their interest is registered, and sponsors can follow up directly after the conference.'
|
|
},
|
|
{
|
|
question: 'What is the most reliable way to display a digital event map?',
|
|
answer: 'Instead of forcing users to download a bulky event app, link your QR code to a mobile-friendly, interactive web map. Ensure the map images are optimized for fast loading on crowded conference Wi-Fi networks.'
|
|
},
|
|
{
|
|
question: 'How can we increase session feedback rates using QR codes?',
|
|
answer: 'Place a large QR code on the exit doors or on the final presentation slide. Linking directly to a short, 3-question survey while the session is still fresh in their minds significantly boosts response rates compared to post-event emails.'
|
|
}
|
|
],`;
|
|
|
|
const gymsPage = `
|
|
'qr-codes-for-gyms': {
|
|
...bySlug('qr-codes-for-gyms'),
|
|
eyebrow: 'Gyms & Fitness',
|
|
titleSuffix: 'for Equipment Tutorials, Schedules, and Trials',
|
|
metaDescription:
|
|
'Use gym QR codes to route members to equipment video tutorials, class schedules, and free trial signups without replacing stickers.',
|
|
intro:
|
|
'Gym QR codes work best when heavy-duty stickers on equipment stay permanent, while the tutorial videos or schedules they link to can be updated.',
|
|
answer:
|
|
'A gym QR code should point members to an instructional video for the machine they are using, or direct prospects to a mobile signup flow.',
|
|
whenToUse: [
|
|
'You want to provide video instructions on how to use complex machines.',
|
|
'You have class schedules that change weekly or seasonally.',
|
|
'You need a contactless way for walk-ins to sign up for a free trial.',
|
|
],
|
|
comparisonItems: [
|
|
{ label: 'Sticker durability', text: 'Permanent application', value: true },
|
|
{ label: 'Video updates', text: 'Change links anytime', value: true },
|
|
{ label: 'Member engagement', text: 'Track usage stats', value: true },
|
|
],
|
|
howToSteps: [
|
|
'Create one dynamic QR code for each piece of equipment or studio door.',
|
|
'Print on durable, sweat-resistant vinyl stickers and apply to machines.',
|
|
'Update the linked videos or schedules in your dashboard as needed.',
|
|
],
|
|
workflowTitle: 'What a good gym QR setup should handle',
|
|
workflowIntro:
|
|
'Stickers on gym equipment are hard to remove. The QR workflow should make your physical labels permanent while the digital content evolves.',
|
|
workflowCards: [
|
|
{
|
|
title: 'Equipment tutorials',
|
|
description: 'Link QR codes on weight machines to short YouTube or TikTok videos demonstrating proper form.',
|
|
},
|
|
{
|
|
title: 'Class schedules',
|
|
description: 'Place a QR code on the studio door that links to the live, up-to-date weekly class schedule.',
|
|
},
|
|
{
|
|
title: 'Contactless signup',
|
|
description: 'Put a QR code on the front door or window for after-hours visitors to claim a guest pass digitally.',
|
|
},
|
|
],
|
|
checklistTitle: 'Gym QR checklist',
|
|
checklist: [
|
|
'Print QR codes on high-quality, sweat-resistant vinyl so they survive cleaning sprays.',
|
|
'Keep the URL destination dynamic so you never have to scrape off old stickers.',
|
|
"Add small text next to the code, e.g., 'Scan to see how to use'.",
|
|
'Ensure your gym has decent WiFi coverage for members to stream the videos.',
|
|
],
|
|
supportLinks: [
|
|
{
|
|
href: '/dynamic-qr-code-generator',
|
|
title: 'Commercial parent: Dynamic QR Code Generator',
|
|
description: 'Best fit for keeping equipment stickers permanent while updating video links.',
|
|
},
|
|
{
|
|
href: '/qr-code-tracking',
|
|
title: 'Sibling page: QR Code Tracking',
|
|
description: 'Useful to see which machines get the most scans and instructional video views.',
|
|
},
|
|
{
|
|
href: '/use-cases/feedback-qr-codes',
|
|
title: 'Feedback QR Codes',
|
|
description: 'Learn how to place QR codes in locker rooms for facility feedback.',
|
|
},
|
|
],
|
|
${newGymFaq}
|
|
heroImage: '/marketing/use-cases/qr-codes-for-gyms.png',
|
|
heroImageAlt: 'QR code sticker on a gym weight machine being scanned for a video tutorial',
|
|
},`;
|
|
|
|
const gymsUseCase = ` {
|
|
slug: 'qr-codes-for-gyms',
|
|
href: '/use-cases/qr-codes-for-gyms',
|
|
title: 'QR Codes for Gyms',
|
|
cluster: 'gyms',
|
|
summary: 'Link workout equipment to tutorial videos, schedules, or trials without reprinting stickers on every machine.',
|
|
parentHref: '/dynamic-qr-code-generator',
|
|
parentTitle: 'Dynamic QR Code Generator',
|
|
ctaLabel: 'Create your gym QR code',
|
|
},
|
|
`;
|
|
|
|
// Helper to replace faq arrays using regex because exact string match is flaky
|
|
function replaceFaqBlock(text, keyName, newFaqStr) {
|
|
const sectionRegex = new RegExp("'" + keyName + "': \\{[\\\\s\\\\S]*?heroImage:", "g");
|
|
return text.replace(sectionRegex, (match) => {
|
|
// Find the start of faq: [
|
|
const faqRegex = /faq:\s*\[[\s\S]*?\],\s*heroImage:/;
|
|
return match.replace(faqRegex, newFaqStr + "\n heroImage:");
|
|
});
|
|
}
|
|
|
|
// 1. Add qr-codes-for-gyms if not exists
|
|
if (!content.includes("'qr-codes-for-gyms': {")) {
|
|
// Inject to useCasePageContent
|
|
const useCasePagesStart = "export const useCasePageContent: Record<string, UseCasePageContent> = {";
|
|
const startIdx = content.indexOf(useCasePagesStart);
|
|
if (startIdx !== -1) {
|
|
const insertIdx = startIdx + useCasePagesStart.length;
|
|
content = content.substring(0, insertIdx) + gymsPage + content.substring(insertIdx);
|
|
}
|
|
}
|
|
if (!content.includes("slug: 'qr-codes-for-gyms'")) {
|
|
const lastCouponIdx = content.lastIndexOf("slug: 'coupon-qr-codes',");
|
|
const insertIdx = content.lastIndexOf(" {", lastCouponIdx);
|
|
content = content.substring(0, insertIdx) + gymsUseCase + content.substring(insertIdx);
|
|
}
|
|
|
|
// 2. Replace FAQs for real estate and events
|
|
content = replaceFaqBlock(content, 'event-qr-codes', newEventsFaq);
|
|
content = replaceFaqBlock(content, 'real-estate-sign-qr-codes', newRealEstateFaq);
|
|
|
|
fs.writeFileSync(file, content);
|
|
console.log("Successfully rewrote FAQs and added gyms if needed");
|