Skip to content

Track a search with cURL

This tutorial demonstrates how to submit a FullSearch event when a user performs a search in the webshop using a direct HTTP call.

Submit the search event

Send a POST request to the Event Receiver with the search phrase and result count:

curl -X POST \
    'https://event-tracking-eventreceiver.bizzkit.biz/api/events' \
    -H 'Content-Type: application/json' \
    -d '{
  "instrumentationKey": "your-instrumentation-key",
  "events": [
    {
      "eventType": "FullSearch",
      "sessionId": "session-abc-123",
      "phrase": "blue running shoes",
      "hits": 42
    }
  ]
}'

Verify

The Event Receiver responds with 202 Accepted when the event batch is received. Events are processed asynchronously.

Warning

Please keep in mind that all examples provided are for illustrative purposes only. They are not intended to represent best practices and should not be used in production without a thorough code review.