How this all works
Setting it up
1Run the database migration
- Supabase dashboard → SQL Editor → New query.
- Paste the whole of
migration-signals.sqland press Run. - It is safe to run more than once. Until it has been run, the Measured signals panel on a report will fail when you load a file.
2Install the collector
- You need Node 20 or newer. Check with
node -v. - Unzip
audit-tools.zipanywhere, then inside that folder runnpm installand thennpx playwright install chromium. - Skipping the second command still works — you lose the phone-width measurements, and the tool says so rather than going quiet.
3Optional: a free Google key
export PAGESPEED_API_KEY=your-keyraises the rate limit.- It works without one. The key is free from the Google Cloud console (PageSpeed Insights API, 25,000 calls a day).
Running a report
1Collect the measurements
node audit/run.mjs https://their-site.co.uk- It writes
audit-signals.jsoninto whatever folder you ran it from. --pages /,/services,/contactaudits those pages instead of discovering them. Without it, pages come from the sitemap, then the home page’s links, capped at twelve.
2Load it here
- Open the report, find Measured signals in the right-hand column, and choose the JSON file.
- The signals appear under the areas they inform. Loading a second run replaces the first rather than adding to it.
- Nothing is scored and no comment is written. The measurements are evidence; every slider is still set by you.
3Say what you could not check
- Each area has a line for it. An area left blank used to mean three different things — not looked at, not applicable, or the site would not load — and all three read as the same dash.
- What the collector could not reach is listed in the signals panel.
Things worth knowing
1Two kinds of question
- Most areas are a slider, because there is a real range between a business with four reviews and one with four hundred.
- Five are yes / sometimes / no buttons instead — replies to reviews, details that agree, analytics, getting hold of you, and structured data. A slider set to 7 on “do they reply” is a number nobody can defend over 6 or repeat next quarter.
- Both store a number, so the grade works the same way. The client sees the word — “Sometimes” rather than “5/10”.
- Put the detail in the comment: replies to the five-star ones, nothing on the two bad ones from March.
2The grade is calculated, never chosen
- A pillar is the weighted mean of the areas scored under it; the four pillars then count equally, whatever number of areas sit under each.
- Unscored areas are left out rather than counted as nought, so half a finished report does not read as a failing business.
3Booking times
- We present Monday to Friday (bank holidays aside) at 09:30, 11:00, 13:30 and 15:00.
- The booking page draws the whole working day and offers only those times. Closed slots say unavailable; a slot only says booked when there is a real booking in it.
- To change the pattern, the three lists are at the top of
build.py:PRESENT_DAYS,PRESENT_SLOTSand the day bounds.
4The first live collector run
- Run it against tractiontactics.com before any client, and check the speed numbers look sane.
- The PageSpeed part was tested against a constructed response, not a recorded one — if Google nests a field differently you would get blanks where the numbers should be, and every test would still pass.
- If you see a finding you think is wrong, it probably is. Say what it was and it goes into the test fixture so it cannot come back.
TT Sites
WordPress sites running TT Theme that share their counts with us: enquiries, traffic, orders, updates and site health. Read-only and counts only, refreshed every six hours.
Add a site
On the site: Appearance → Theme Settings → Integrations → “Share insights with a central dashboard”. Tick it, generate a token and copy the paste URL.
No sites yet
Add a site running TT Theme 0.42.0 or later (its admin turns sharing on, generates a token and sends you the paste URL), or any other website by its address.
How search and analytics works
- Google is one sign-in as [email protected], read-only (Analytics and Search Console, nothing that can change them). Every card is matched to the GA4 property and Search Console property for the same address. If a match is wrong or missing, open the card’s Details → Search & analytics and press Change.
- Other Google logins. When a site’s Analytics or Search Console is in a different Google account (the client’s own, say), press Add another Google login and sign in as that account, read-only. Its properties join every card’s list, grouped by login, and are matched by address the same way; choose one by hand with Change if needed. Simpler still, where the client agrees: have them add [email protected] as a user (Viewer in Analytics, Restricted in Search Console), and no extra login is needed. If the OAuth consent screen is set to Internal, Google only lets tractiontactics.com accounts sign in; switch it to External (In production) to add others. Needs
supabase/migration-google-logins.sql, once. - Bing uses an API key from Bing Webmaster Tools → Settings → API access, pasted above (kept encrypted), or set as
BING_WEBMASTER_KEYin Netlify. - The figures are the last 28 days against the 28 before, pulled once a day for every card. Search Console runs about two days behind, so its 28 days end a little earlier.
- Disconnecting Google here also withdraws the permission from the Google account.
Setting it up, once. In Google Cloud Console, signed in as hello@: create a project; enable the Google Analytics Admin API, Google Analytics Data API and Google Search Console API; set up the OAuth consent screen (Internal if tractiontactics.com is Google Workspace, otherwise External and In production, because test-mode sign-ins expire after seven days); create an OAuth client of type Web application with the redirect URI https://themarketingmanager.co.uk/.netlify/functions/google-oauth. Put its ID and secret in Netlify as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, redeploy, run supabase/migration-site-analytics.sql, then press Connect Google above.
How connecting a site works
- On the site, an administrator opens Appearance → Theme Settings → Integrations, ticks Share counts with a central dashboard and saves. Sharing is off until somebody does that; a theme update never turns it on.
- They choose which of the four sections to share (traffic, enquiries, orders, updates), generate a token and copy the paste URL. The token is shown once.
- Here, Add a site, paste the URL (the token comes with it) and press Test and add. Nothing is saved unless the site answers.
- Counts are fetched every six hours from our server. A site allows 30 requests an hour; this page stops at 28 and waits when a site asks it to.
- Enquiries count only forms built with the theme’s own form builder. HubSpot forms send their entries to HubSpot, so they are not counted here.
- Removing a site here does not turn sharing off on it. Revoke the token on the site as well if it should stop answering.
Client dashboards
Let a client see the cards for their sites, and nothing else: by email sign-in, a shared link, or both.
Loading…