3.5 KiB

Landing Page Templates

These Handlebars templates generate beautiful, TCPA-compliant landing pages for A2P SMS campaigns.

Templates

opt-in.hbs

The main opt-in page with:

  • Business branding (logo or initial)
  • Phone number input with auto-formatting
  • Explicit TCPA-compliant consent checkbox
  • Message frequency disclosure
  • STOP/HELP instructions
  • Links to Privacy Policy and Terms
  • Carrier list disclosure
  • Professional design with Tailwind CSS

privacy-policy.hbs

Comprehensive privacy policy covering:

  • Information collection and use
  • Data sharing policy (we don't sell data)
  • Security measures
  • User rights (opt-out, access, deletion)
  • TCPA/CTIA compliance statements
  • Data retention policies
  • Contact information

terms.hbs

Complete terms of service with:

  • SMS program description
  • Explicit consent requirements
  • Message frequency and carrier charges
  • Opt-out instructions
  • Carrier liability disclaimers
  • Eligibility requirements
  • Compliance with TCPA/CAN-SPAM

Template Variables

All templates accept these Handlebars variables:

{
  businessName: string;
  businessSlug: string;
  useCase: string;
  useCaseDescription: string;
  messageFrequency: string;
  privacyPolicyUrl: string;
  termsUrl: string;
  contactEmail: string;
  contactPhone: string;
  brandColor: string;           // Default: #3B82F6 (blue)
  logoUrl?: string;             // Optional logo
  businessInitial: string;      // First letter for placeholder
  currentDate: string;          // Formatted date
  currentYear: number;          // For copyright
}

Usage

import { generateLandingPages } from './src/pages/generator';
import { deployLocal, deployVercel } from './src/pages/deployer';

// Generate pages
const pages = generateLandingPages(config, campaign, business);

// Deploy locally
const result = await deployLocal(pages, {
  publicDir: './public',
  baseUrl: 'https://yourdomain.com'
});

// Or deploy to Vercel
const result = await deployVercel(pages, {
  apiToken: process.env.VERCEL_TOKEN!,
  projectName: 'a2p-landing',
  subdomain: 'comply'
});

console.log('Opt-in URL:', result.optInUrl);
console.log('Privacy URL:', result.privacyPolicyUrl);
console.log('Terms URL:', result.termsUrl);

Design Features

  • Mobile-responsive: Perfect on all devices
  • Modern UI: Clean, professional design with Inter font
  • Brand customization: Custom colors and logos
  • Accessibility: Proper labels, ARIA attributes
  • Form validation: Client-side validation with helpful errors
  • Phone formatting: Automatic (555) 123-4567 formatting
  • Professional color scheme: Subtle gradients, proper spacing
  • Trust indicators: TCPA/CTIA compliance badges

Customization

To customize the templates:

  1. Edit the .hbs files directly
  2. Modify colors, spacing, or content
  3. Keep TCPA-compliant language intact
  4. Test on mobile devices
  5. Ensure all required disclosures remain visible

Compliance Checklist

Prior express written consent checkbox
Clear description of message program
Message frequency disclosure
"Msg & data rates may apply" notice
STOP/HELP instructions
Links to Privacy Policy and Terms
Carrier list disclosure
Contact information (email/phone)
No pre-checked consent boxes
Consent not bundled with other terms

These templates are designed to be TCPA-compliant but should be reviewed by legal counsel before use. Compliance requirements may vary by jurisdiction and use case.