Building a Configurable Mega Menu

π Google Sheets API Key Setup Guide
Follow these steps to get your API key for the mega menu system
Navigate to the Google Cloud Console and sign in with your Google account:
Option A: Create New Project
- Click the project dropdown at the top
- Click "New Project"
- Enter project name: "1stContact Menu System"
- Click "Create"
Option B: Use Existing Project
- Select your existing project from the dropdown
In your project dashboard:
- Click on "APIs & Services" in the left sidebar
- Click "Enable APIs and Services" (blue button at top)
- Search for "Google Sheets API"
- Click on "Google Sheets API" from results
- Click the blue "Enable" button
Now create your API key:
- Go to "APIs & Services" β "Credentials"
- Click "+ Create Credentials" at the top
- Select "API Key" from the dropdown
- Your API key will be generated and displayed
For security, restrict your API key:
- Click the pencil icon next to your new API key
- Under "API restrictions":
- Select "Restrict key"
- Check "Google Sheets API"
- Uncheck all others
- Under "Website restrictions" (optional):
- Select "HTTP referrers"
- Add your domain:
*.1stcontact.ai/* - Click "Save"
Open your Google Sheet and look at the URL:
Copy the long string between /d/ and /edit
Your sheet needs to be publicly viewable:
- In your Google Sheet, click "Share" (top right)
- Click "Change to anyone with the link"
- Set permission to "Viewer"
- Click "Done"
Replace these values in your JavaScript code:
To verify everything works:
- Open your browser's Developer Tools (F12)
- Go to the Console tab
- Refresh your webpage
- Look for success messages like "Navigation system initialized successfully"
- Your API key is correct
- Your Sheet ID is correct
- Your sheet is publicly viewable
- API restrictions have taken effect (wait 5 minutes)
π Congratulations!
You've successfully set up Google Sheets API for your 1stContact.ai mega menus!
Now you can update your navigation menus by simply editing your Google Sheet.
π Quick Reference:
Google Cloud Console: console.cloud.google.com
API Key Location: APIs & Services β Credentials
Sheet ID Location: In your Google Sheet URL between /d/ and /edit
Sheet Structure: Card Title | Card Subtitle | Card Icon | Link Text | Link URL | Link Icon
1stContact.ai answers calls and texts 24/7, books appointments, and keeps every lead in one pipeline. $197/mo, unlimited users and contacts.
View plans