funnelstepview¶
Funnels are very important in tracking, because they will lead a user to the conversion.
More information about funnelsteps can be found in the funnelsteps documentation.
harvest.trackEvent({
"event":"funnelstepview",
"data":{
"funnelName": "Newsletter subscription",
"funnelStep": "Success"
}
});
The above example is an example of how to track a funnelstep. Only the funnelName and funnelStep are required in this case.
If you want to track a funnelstep of type “purchase”, then you also need a transactionID.
harvest.trackEvent({
"event":"funnelstepview",
"data":{
"funnelName": "Checkout",
"funnelStep": "Success",
"transactionID": "2093123"
}
});
It is also possible to add products to the funnelstepview. This is relevant for checkout steps and purchases.
harvest.trackEvent({
"event":"funnelstepview",
"data":{
"funnelName": "Checkout",
"funnelStep": "Cart",
"products": [{
"id": "123sdfsfd123",
"name": "Baseball Jacket Grain",
"price": 99.95,
"quantity": 1,
"position" : 1
}]
}
});
In the above example you see that we track the cart page where a user had some products in the cart.
With the Javascript API you have to detect the interaction with the funnelsteps yourself. It is also possible to let our library detect whether a funnelstep is in view.
You can do this with the data-track-funnelstepview attribute.