Data Mapping
Variable → Source
The master mapping table. Every metric on the dashboard, where it is fetched from, and which file renders it.
How to use this table
When a metric shows the wrong value or shows
-, look it up here. The Source column tells you which API to debug; the Component column tells you where the row is rendered.Paid Marketing tab
| Variable | Source | Origin field | Status |
|---|---|---|---|
| Ad Spend (Google) | GAds | Google Ads API metrics.cost_micros / 1_000_000 | partial |
| Clicks (Google) | GAds | Google Ads metrics.clicks | partial |
| Impressions (Google) | GAds | Google Ads metrics.impressions | partial |
| Conversions (Google) | GAds | Google Ads metrics.conversions | partial |
| Avg CPC | GAds | metrics.average_cpc / 1_000_000 | partial |
| CTR (Google) | GAds | metrics.ctr | partial |
| Cost Per Conversion | GAds | metrics.cost_per_conversion / 1_000_000 | partial |
| Ad Spend (Meta) | Meta | insights.spend | partial |
| Impressions (Meta) | Meta | insights.impressions | partial |
| Clicks (Meta) | Meta | insights.clicks | partial |
| CTR (Meta) | Meta | insights.ctr | partial |
| CPC (Meta) | Meta | insights.cpc | partial |
| CPM (Meta) | Meta | insights.cpm | partial |
| Leads (Meta) | Meta | insights.actions[type=lead] | partial |
| Cost Per Lead (Meta) | Meta | insights.cost_per_action_type[lead] | partial |
| Landing Page Views | Meta | insights.actions[type=landing_page_view] | partial |
| Link Clicks | Meta | insights.inline_link_clicks | partial |
| ROAS | Calc | (GHL pipelineValue / (GAds.spend + Meta.spend)) × 100 | live |
Social Media tab
| Variable | Source | Origin | Status |
|---|---|---|---|
| Engagement | Social | n8n push (key: meta_engagement) | pending |
| Followers | Social | n8n push (key: followers) | pending |
| Comments | Social | n8n push (key: meta_comments) | pending |
| Likes | Social | n8n push (key: meta_likes) | pending |
| Views | Social | n8n push (key: meta_video_views) | pending |
| YouTube Views | YT | YouTube channels.list statistics.viewCount | live |
| YouTube Subscribers | YT | YouTube channels.list statistics.subscriberCount | live |
Website Performance tab
| Variable | Source | Origin | Status |
|---|---|---|---|
| Website Conversion Rate | GA4 | GA4 conversions / sessions | live |
| Total Leads from Website | GHL | leadBreakdown sum (planned) | planned |
| Website Form Leads | GHL | leadBreakdown.webforms | pending |
| Website Chat Leads | GHL | leadBreakdown.webchats | pending |
| Website Call Leads | GHL | GHL contacts source = call | planned |
| Appointments Booked from Website | GHL | derived from contact attribution | planned |
| Total Website Traffic | GA4 | GA4 totalUsers | live |
| Avg Time on Site | GA4 | GA4 averageSessionDuration | live |
| Avg Pages per Visit | GA4 | GA4 screenPageViewsPerSession | live |
| Mobile Speed Score | PSI | PageSpeed Insights mobile.lighthouseResult.categories.performance.score | live |
| Desktop Speed Score | PSI | PageSpeed Insights desktop.lighthouseResult.categories.performance.score | live |
| Clarity Sessions / Rage Click / Dead Click / Scroll Depth | Clarity | Microsoft Clarity API (not yet integrated) | planned |
SEO / GEO / AIEO tab
| Variable | Source | Origin | Status |
|---|---|---|---|
| Organic Traffic to Site | GSC | GSC clicks | live |
| Top Pages from Organic Search | GSC | GSC dimension=page (UI pending) | planned |
| Organic Website Form Leads | GHL | derived from contact source = organic_seo | planned |
| Appointments from Organic Traffic | GHL | appointmentsBySource.organic_seo | planned |
| Keywords in Top 3/5/10/20 | SERP | DataForSEO via n8n cache | partial |
| Total Tracked Keywords | SERP | DataForSEO summary.totalKeywords | partial |
| Top 10 Keywords (GSC) | GSC | GSC searchAnalytics dimensions=query | live |
| Total Backlinks | SERP | DataForSEO backlinks summary | partial |
| Referring Domains | SERP | DataForSEO referringDomains | partial |
| Domain Rank | SERP | DataForSEO rank | partial |
| New Reviews - Total | GBP | Places API userRatingCount | live |
| New Reviews 5 Stars | GBP | Places API reviews where rating=5 (sample) | partial |
| Average Rating | GBP | Places API rating | live |
| Calls from GBP | GBP | Performance API callClicks (CALL_CLICKS) | live |
| Total GBP Actions | GBP | Performance API sum of websiteClicks + callClicks + drivingDirections | live |
Local SEO Keywords tab
| Variable | Source | Origin | Status |
|---|---|---|---|
| Views on Search | GBP | Performance API BUSINESS_IMPRESSIONS_DESKTOP_SEARCH + MOBILE_SEARCH | live |
| Views on Maps | GBP | Performance API BUSINESS_IMPRESSIONS_DESKTOP_MAPS + MOBILE_MAPS | live |
| Total Views | GBP | sum of above | live |
| Phone Calls | GBP | Performance API CALL_CLICKS | live |
| Website Clicks | GBP | Performance API WEBSITE_CLICKS | live |
| Driving Directions | GBP | Performance API BUSINESS_DIRECTION_REQUESTS | live |
| Tracked Keywords (Local Pack / Maps) | Local | clients.local_seo_keywords JSONB | live |
| Geo grid embed | Local | clients.local_seo_keywords.embed_url (Local Falcon / Local Dominator) | live |
Email & SMS tab
Every row in this tab is an n8n push (ext() helper). Until n8n is configured, every row is hidden by the auto-hide logic.
| Variable | n8n key |
|---|---|
| Emails Sent (Total) | email_total |
| Outbound / Inbound / Automated Emails | email_outbound, email_inbound, email_automated |
| Email Response Rate | email_response_rate |
| SMS counts and rate | sms_total, sms_outbound, sms_inbound, sms_automated, sms_response_rate |
| Total Emails / SMS Sent | total_emails_sms_sent |
| Total Conversations | total_conversations |
| Calls (Total) | calls_total |
| Bookings / Sales Won from Email / SMS | GHL attribution (planned) |
Calculated KPIs tab
| Variable | Source / formula |
|---|---|
| Cost/Lead | n8n push (cost_per_lead) — fallback (GAds.spend + Meta.spend) / leads if pushed value missing |
| Cost/Appointment | n8n push (cost_per_appointment) |
| Cost/Quote | n8n push (cost_per_quote) |
| Cost/Sale | n8n push (cost_per_sale) |
| Cost Per Customer Acquisition | n8n push (cost_per_acquisition) |
Client Portal — Summary sub-tab
| Variable | Source / formula |
|---|---|
| Total Revenue | GHL pipelineValue (sum of won deal monetaryValue) |
| Avg Ticket Value | revenue / wonCount |
| Cost Per Appointment | adSpend / booked |
| Cost Per Sale | adSpend / wonCount |
| Lead to Appointment Rate | (booked / leads) × 100 |
| Lead to Sale Rate | (won / leads) × 100 |
| Appointment to Sale Rate | (won / booked) × 100 |
| Leads In | GHL opportunities.total (date-filtered) |
| Appointments Booked / Showed | GHL calendar events (date-filtered) |
| Quoted | GHL opportunities in stage that contains "quote" (case-insensitive) |
| Jobs Sold | GHL won deals (date-filtered) |
| Webforms / Webchats / Phone Calls / Qualified Calls | GHL leadBreakdown (with n8n fallback for older clients) |