I am sending data from my own endpoint using tha HTTP Tracking API for quite a while and noticed that tracking stopped working a few days ago. After making sure that my recent code changes are not the main reason I found out that populating the urlref parameter with an empty value leads to missing data.
I see an “Broken event” error in the debugger and “Error message: urlref is not a valid URL: relative URL without a base”. Well… sometimes it really is empty and I do not think that I did something differently in the past. This is my raw payload:
I fixed it in my outgoing requests for now but I would like to know if a parameter that is present but empty really should lead to an error… and: has it been always like that or was there a change on your side?
We have checked this and it looks like there wasn’t a change to how we treat the urlref parameter for around 2 years. The broken event is being generated intentionally.
I’d answer yes and no . This behaviour is in place as a precautionary measure - I’d say a good practice from a coding perspective. urlref is pretty crucial in 2 cases:
Channel detection
Session detection - depending on the tracker settings, a specific urlref might cause a session split
Is it necessary? I don’t think so.
Is showing a broken event helpful? Yes, as it might indicate an error in your HTTP API setup.