Google My Business model

Search keywords monthly

The search terms people used to find each location on Google Search and Maps, per month, ranked. The "Searches" panel of the Performance view.

Grain
month x location_id x search_keyword
Built from
  1. 2
    Raw tables
  2. 2
    Staging
  3. 1
    Core
  4. 1
    Analytics
Reads from Google My Business
account_locationlocation_search_keywords_impressions_monthly
Ships as
Weld and dbt SQL, open source on GitHub
core.google_my_business_profile.search_keywords_monthly
1-- core.google_my_business_profile.search_keywords_monthly
2-- The search terms people used to find each location on Google Search and Maps,
3-- per month, ranked. The "Searches" panel of the Performance view.
4--
5-- Grain: month x location_id x search_keyword.
6-- Depends on: staging.google_my_business_profile.search_keyword_impressions, .location
7--
8-- Google hides small counts behind a threshold. For those rows `impressions` is
9-- NULL, `is_below_threshold` is TRUE and `impressions_upper_bound` is the
10-- threshold. Sum `impressions` for a floor and `impressions_upper_bound` for a
11-- ceiling; there is no exact total. Keyword impressions are counted per month, not
12-- per day, so they do not add up to the daily impressions.
13
14SELECT
15    k.month,
16    k.location_id,
17    l.location_name,
18    k.search_keyword,
19    k.impressions,
20    k.impressions IS NULL                                  AS is_below_threshold,
21    COALESCE(k.impressions, k.impressions_threshold)       AS impressions_upper_bound,
22    RANK() OVER (
23        PARTITION BY k.month, k.location_id
24        ORDER BY COALESCE(k.impressions, 0) DESC
25    )                                                      AS keyword_rank
26FROM {{staging.google_my_business_profile.search_keyword_impressions}} k
27LEFT JOIN {{staging.google_my_business_profile.location}} l USING (location_id)

This model and the 3 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().

Notes

How it counts. And where it stops.

Google hides small counts behind a threshold. For those rows `impressions` is NULL, `is_below_threshold` is TRUE and `impressions_upper_bound` is the threshold. Sum `impressions` for a floor and `impressions_upper_bound` for a ceiling; there is no exact total. Keyword impressions are counted per month, not per day, so they do not add up to the daily impressions.

Raw tables it reads

  • raw.google_my_business_profile.account_location
  • raw.google_my_business_profile.location_search_keywords_impressions_monthly

Put Google My Business in front
of your agents.

Connect Google My Business, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.