Mobile app version of vmapp.org
Login or Join
Speyer207

: Tracking user experience and behavior on a website using Google Analytics to display related products How can I track a user action on my website? What I want to do is track when the user

@Speyer207

Posted in: #GoogleAnalytics #Tracking

How can I track a user action on my website?

What I want to do is track when the user viewed product, and then display related products to the user.

Would this be different between ga.js and analytics.js from Google? Which method of Google Analytics should I use? Page tracking?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

Google Analytics is not sufficient for your use case. Your system doesn't have real time access to the data collected by Google Analytics for a particular user. Because of this, you can't use Google analytics data to change what is later displayed on the site to the user.

You may want to use Google Analytics to track which products get viewed on your website anyway. It is useful to see stats on your products to make decisions about which products to feature. If each product has its own page, then page tracking is appropriate. If products get loaded via AJAX then you will need to use events.

To display related products to users, you will also need to track a list of viewed products where the server can read it. User cookies or a server side session object would be the places that this information would normally be stored. Once you have a list of recently viewed products, your server can use that to generate a list of related products to show the user.

If you are just implementing Google Analytics for the first time, you should use Universal Analytics (analytics.js). That is the newer version with more features. Google will eventually be converting all sites over to it.

10% popularity Vote Up Vote Down


 

@Deb1703797

Use Analytics events. More docs here: Event Tracking - Web Tracking (analytics.js)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme