I would like to use ga for my php mvc website.
Suppose I put the code in the controller for the index page:
This means it will be triggered whenever a user goes into the index but I will have no way to determine if the user is logged in or not, right?
Because normally, if I get to a login based website the home page usually serves as the welcome screen and, in case you are logged in, as the main page for it.
How can I avoid this? I thought I could use GET parameters in the URLs so that I can see the difference between logged in / not logged in but, it looks a bit hackish.
Thanks in advance.
You can use your Custom Variables - Web Tracking (ga.js)
You can also use the Event Tracking - Web Tracking (ga.js)
You have to read the full documentation of the Google Analytic API . They have provided many ways for tracking. Also read the Google Analytic Reporting API and Data Integration.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.