Google — record connection tracking event
Overview
Record a browser-side step of the Google Business Profile connection funnel (sign-in clicked, consent denied, callback error, locations listed) for connection reporting. Fire-and-forget: The endpoint accepts only client-reportable funnel events — connection state changes (connected/disconnected) are recorded server-side only and cannot be fabricated here.
Prerequisites
- A bearer token in the
Authorizationheader, OR an invitehash, OR the public connect-pagecompany_id_hash, ORsource=registration(anonymous signup wizard).
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/google/connection-event
Authentication
-
A bearer token is optional here. Send one to act as a signed-in user, or supply one of the documented alternatives instead.
-
Use a bearer token.
-
OR use an invite
hash. -
OR use the public connect-page
company_id_hash. -
OR use
source=registration(anonymous signup wizard).
Rate limit
- 30 requests/min per IP (public).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
event | string | Required | One of: oauth.started, oauth.denied, oauth.callback_error, locations.fetched, locations.none_found. |
source | string | Required | One of: invite_link, connect_google_page, registration, settings, debugger. |
store_review_site_id | integer | Optional | Binds the event to a row (must be accessible via hash/token). |
hash | string | Optional | Invite hash [store_id, 15]; grants access without a token. |
company_id_hash | string | Optional | Hashid of the account (public connect page). |
message | string (≤500) | Optional | Error detail returned by Google, if any. |
accounts_count | integer (≥0) | Optional | Accounts listed. |
locations_count | integer (≥0) | Optional | Locations listed. |
{
"event": "oauth.started",
"source": "settings",
"store_review_site_id": "<storeReviewSiteId>"
}How it works
Returns {data:{status:"recorded"}} on success; on an internal tracking error it swallows the failure and returns {data:{status:"skipped"}} so the SPA is never blocked. Validation errors and authentication failures return appropriate non-2xx status codes.
Response
200 Recorded · 200
200{
"data": {
"status": "recorded"
}
}200 Skipped (tracking error swallowed) · 200
200{
"data": {
"status": "skipped"
}
}422 Validation error · 422
422{
"message": "The selected event is invalid.",
"errors": {
"event": [
"The selected event is invalid."
]
}
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
422 | Validation error |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/google/connection-event" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"event": "oauth.started", "source": "settings", "store_review_site_id": "<storeReviewSiteId>"}'Updated 9 days ago
