Skip to main content
POST
/
locations
/
api
/
v1
/
public
/
widget-events
Track widget analytics events
curl --request POST \
  --url https://www.closient.com/locations/api/v1/public/widget-events \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": "widget_load",
  "api_key": "",
  "referrer": "",
  "query": "",
  "location_public_id": ""
}
'

Body

application/json
event
enum<string>
required

Event type.

Available options:
widget_load,
location_search,
view_store_click,
get_directions_click
Example:

"widget_load"

api_key
string
default:""

Publishable API key that triggered the event.

referrer
string
default:""

Host domain / document.referrer.

query
string
default:""

Search query (for location_search events).

location_public_id
string
default:""

Location public_id (for view_store_click events).

Response

204

No Content