Funnels are amazing to track custom flows like purchases, sign ups or whatever you want, really.
The first thing it's to create your event of type Funnel. You can do this in the Event
view inside our application.
It's important to add a title, but more important the number of steps in order. You have to write one step per line. Each step is important, because you have to send on of this in each event.
Now you just need to trigger the funnel event in your application. This is as simple as making a fetch request to the endpoint with the event UUID.
fetch(
`https://metricswave.com/webhooks/${eventUuid}?
step=Add To Cart
&user_id=123456`
)
You can also make a POST
request if you prefer. You just need to make the request to the same path and add both fields in the body as json.
If you are logging your traffic using our visits script. You can log a funnel step using window.metricswave()
function.
window.metricswave(eventUuid, {step: 'Add To Cart', user_id: 123456})
You can also, if you prefer, send a POST request with the params in a json body. In this case it will be something like
this {step: 'Add To Cart', user_id: 123456}
.
With POST request is important to set Content-Type: application/json
and Accept: application/json
headers. Here you
can find an example of a request made from bash terminal.
Start for free, and upgrade your account at any moment.