Tracking Clicks on Links with Cloudflare: Wich service do you recommend?

Hello! I'm building an app and want to track clicks on links without managing my own database. I already use Cloudflare for my app. What's the best way to handle this: Zaraz? Workers? An other Cloudflare service? Any insights or examples on which service fits better? thank you!
4 Replies
Chaika
Chaika3w ago
There's nothing built in that just does it natively. Zaraz is a platform to load/use third parties like Google Analytics/Facebook pixel, etc, some of which may offer that. Workers is a generic serverless code platform which you could build something for that on, using Workers + Analytics Engine to track (only 90 days retention), just depends what you want and what you mean as "without managing your own database"
adilson
adilsonOP3w ago
Thank you for your help! I'm planning to use Workers Analytics Engine with writeDataPoint() to track my link clicks. I have two questions about data visualization: 1. Is there a built-in dashboard in Cloudflare where I can directly view this data? 2. If not, do I need to build my own dashboard using the SQL API to query and visualize the data? I want to make sure I understand the visualization options before implementing this solution. Thank you!
Chaika
Chaika3w ago
Is there a built-in dashboard in Cloudflare where I can directly view this data?
Not really, most you have is a basic page with graphs of how many data points are being written (see attached)
If not, do I need to build my own dashboard using the SQL API to query and visualize the data?
Yes, easiest way is to go with Grafana: https://developers.cloudflare.com/analytics/analytics-engine/grafana/ Host your own grafana portal or you can use the hosted free solution I believe, and you can with relative ease make nice graphs (second screenshot). If you wanted your customers to view it/interact with it, would have to make something around the api
Cloudflare Docs
Querying from Grafana | Cloudflare Analytics docs
Workers Analytics Engine is optimized for powering time series analytics that can be visualized using tools like Grafana. Every event written from the runtime is automatically populated with a timestamp field.
No description
No description
adilson
adilsonOP3w ago
thanks a lot
Want results from more Discord servers?
Add your server