Track specific URL parameters

Hi there,

I have a website where people can search travel information and I would like to track parameters that are in the URL path. At the moment, I can track the URLs individually but it’s a bit hard to display stats in a meaningful way. For example, the format is as follows /search/:from/:to/:departureDate/:returnDate which gives something like /search/CH/HU/2025-01-20/2025-01-23.

What I’m trying to achieve is create a dashboard that could show me how many people use a certain departure place (from), arrival place (to) or certain dates (departure or return). Even better would be for the codes to display proper names, like CH would be shown as Switzerland. But that’s not necessary. Already being able to compare popular departures, destinations and dates would be cool.

Is there a way to create a report by parsing URLs? Or would it be better to fire events with these parameters?

Thanks!

Hi Rafael,

Welcome to the forums!

I think using a custom event with the parameters attached as meta data would be best. Alternatively, you could also use tags and attach them to the result page (if there is one).

Are you planning to use the API to pull the data? I think that would make it easy to compare the destinations, as filtering all of them on the dashboard would be time consuming.

Please let me know if you have any questions about that or need help with the implementation :slight_smile: