What should be best approach to track all events performed by a user on a website?

72 views Asked by At

I have a website which is used to search knowledge. I want to create a analytics tools to generate reports which contains data e.g. which user searched for which term. On which answer he clicked after getting results. One thing I have in my mind is JMS queue. i.e. create a queue, store those events in form of messages in this queue and then process those messaged and store them in DB. Any suggestions?

1

There are 1 answers

1
Silver Ringvee On

If you want to track events, I would go with Google Analytics Events.

First of all, start by figuring out the exact structure (Categories, Actions, Labels), so the result would be something like this:

category: {{my-category}}
action: search
label: {{search-term}}

or

category: {{my-category}}
action: click
label: {{search-answer-label}}

Change values in curly braces

Use custom dimension to collect unique identifiers for each user, so that you can later create a segment for a specific user and explore what they searched for and clicked on.

Of course, you can then create segments by whatever Google Analytics allows you to, and see the search terms for mobile users only etc.

I would definitely suggest GA whenever possible rather than storing them just in your DB.

Read more about the events:https://developers.google.com/analytics/devguides/collection/analyticsjs/events