Reputation: 3
Can I log user events or actions in CloudFront in AWS? I need the same functionality like in Google Analytics?
Upvotes: 0
Views: 243
Reputation: 629
You can enable Cloudfront logs to S3 and use Athena to query Link to guide
How to create table in Athena from Cloudfront logs
You can track number of user accessing specific path or query, but it can only track requests, not some "click in page and do some action without requests" event . It's also can't track specific users or send further information, which you are able to send to Google Analytic using JS.
Edit: You can also use CF metrics to track requests. Have a look at this: https://dev.to/rimutaka/replacing-google-analytics-with-cloudfront-metrics-15o0
It also cost a bit for S3 and Athena if you are doing it too much.
Upvotes: 1