Note: The agg_google_my_business_location_daily and agg_google_my_business_metrics tables contain metrics that were deprecated by Google on March 30, 2023. Yext will keep the historical data, but from March 30th onwards, all of the data for the affected metrics will return zeroes.
The schema is named legacy_listings because these are the legacy listings tables in Snowflake, not to be confused with the listings schema, which contains the new listings tables.
Activities Daily
legacy_listings.agg_activities_daily
This view contains various listings activity metrics aggregated by day.
| Column | Data Type | Description |
|---|---|---|
business_id | NUMBER | The numeric identifier for the account |
entity_id | NUMBER | The UID for the entity |
date | DATE | The date |
publisher_id | NUMBER | The numeric identifier for a publisher |
publisher_suggestion_status | VARCHAR | The status of a publisher suggestion. Can be one of ACCEPTED, REJECTED, or NEW |
listings_live_type | VARCHAR | Can be one of CREATED or CLAIMED |
publisher_suggestions | NUMBER | The count of publisher suggestions |
social_posts | NUMBER | The count of social posts |
duplicates_suppressed | NUMBER | The count of duplicates suppressed |
duplicates_detected | NUMBER | The count of duplicates detected |
listings_live | NUMBER | The count of new listings that went live |
number_listings_updated | NUMBER | The count of listings that were updated |
Sample Queries
Get the average of publisher suggestions from Google per entity in the past 7 days. First, we can use the publishers view to figure out which publisher ID corresponds to Google.
select publisher_id, resource_name from prod_sharing.listings.publishers where resource_name like 'GOOGLE%'
The result of this query tells us that the publisher ID for Google is 715, so we can use that as a filter in our query on the agg_activities_daily table.
select entity_id, date, avg(publisher_suggestions) from prod_sharing.legacy_listings.agg_activities_daily where publisher_id = 715 and date > dateadd(day, -8, current_date) group by 1,2 order by 2
Bing Searches
legacy_listings.agg_bing_weekly
This view contains your business's Bing search impressions by week.
| Column | Data Type | Description |
|---|---|---|
business_id | NUMBER | The numeric identifier for the account |
entity_id | NUMBER | The UID for the entity |
entity_type_id | NUMBER | The entity type ID |
week | TIMESTAMP_NTZ | The week associated with the record |
serp_impressions | NUMBER | The count of Bing SERP impressions |
Sample Query
Get Bing searches for a given week.
select
businesses.business_id,
name,
entity_id,
week,
sum(serp_impressions) as bing_searches
from legacy_listings.agg_bing_weekly
join public.businesses using(business_id)
where week = 'yyyy-mm-dd'
and week is not null
and entity_id is not null
and serp_impressions is not null
group by 1,2,3,4Facebook Locations
legacy_listings.agg_facebook_location_daily
This view contains Facebook page impressions, views, and engagement by day, location, and additional dimensions.
| Column | Data Type | Description |
|---|---|---|
business_id | NUMBER | The numeric identifier for the account |
entity_id | NUMBER | The UID for the entity |
date | TIMESTAMP_NTZ | The date associated with the record |
gender | VARCHAR | Group of users by gender |
age | VARCHAR | Group of users by age |
impression_type | VARCHAR | The type of impression. Can be PAID, ORGANIC, or VIRAL |
story_type | VARCHAR | The type of Facebook story interaction |
cta | VARCHAR | The unique identifier of the CTA, if applicable |
is_total | BOOLEAN | Indicates an aggregate row |
impressions | NUMBER | The count of Facebook page impressions |
post_impressions | NUMBER | The count of Facebook post impressions |
talking_about | NUMBER | The count of unique users who have interacted with your Facebook page |
clicks | NUMBER | The count of CTA clicks |
Google My Business Locations
legacy_listings.agg_google_my_business_location_daily
This view contains the legacy Google My Business (GMB) metrics, dimensioned by each individual Google metric type.
| Column | Data Type | Description |
|---|---|---|
business_id | NUMBER | The numeric identifier for the account |
entity_id | NUMBER | The UID for the entity |
date | TIMESTAMP_NTZ | The date of the record |
metric_type | VARCHAR | The type of GMB metric |
actions | NUMBER | The count of actions for website or driving direction action types |
phone_actions | NUMBER | The count of phone actions |
map_views | NUMBER | The count of map views |
search_views | NUMBER | The count of search views |
queries | NUMBER | The count of queries, by query type |
Google My Business Metrics
legacy_listings.agg_google_my_business_metrics
This view contains the legacy Google My Business (GMB) metrics aggregated across all Google action types.
| Column | Data Type | Description |
|---|---|---|
business_id | NUMBER | The numeric identifier for the account |
entity_id | NUMBER | The UID for the entity |
date | TIMESTAMP_NTZ | The date of the record |
actions | NUMBER | The sum of all website and driving direction actions |
phone_actions | NUMBER | The sum of phone actions |
map_views | NUMBER | The sum of map views |
search_views | NUMBER | The sum of search views |
queries | NUMBER | The sum of all query types |
Sample Query
Get searches, Google map views, and Google search views dimensioned by day for the past 30 days.
select
date,
sum(queries) as queries,
sum(map_views) as map_views,
sum(search_views) as search_views
from legacy_listings.agg_google_my_business_metrics
where date > dateadd(day, -31, 'yyyy-mm-dd')
group by 1 order by 1 descLocation Daily
legacy_listings.agg_location_daily
This view contains an aggregation of profile views and social engagement by day, at the entity level.
| Column | Data Type | Description |
|---|---|---|
business_id | NUMBER | The numeric identifier for the account |
entity_id | NUMBER | The UID for the entity |
entity_type_id | NUMBER | The entity type ID |
date | TIMESTAMP_NTZ | The date associated with the record |
publisher_id | NUMBER | The UID for a publisher |
platform | NUMBER | The platform, or device (1=DESKTOP, 2=MOBILE, 3=TABLET, 4=BOT, 5=UNKNOWN) |
serp_impressions | NUMBER | The count of publisher SERP impressions |
profile_views | NUMBER | The count of entity profile views |
special_offer_clicks | NUMBER | The count of featured message clicks |
fb_likes | NUMBER | The count of Facebook likes |
fb_were_here | NUMBER | The count of Facebook check-ins |
fb_talking_about | NUMBER | The count of unique users who have interacted with your Facebook page |
yelp_page_views | NUMBER | The count of Yelp page views |
ticket_clicks | NUMBER | The count of clicks on a button that led a user to tickets |
Sample Queries
Get profile views and SERP impressions by day for the last 30 days.
select
date,
sum(profile_views) as profile_views,
sum(serp_impressions) as serp_impressions
from legacy_listings.agg_location_daily
where date > dateadd(day, -30, current_date)
group by 1 order by 1 desc