: "PHP" is showing up in Browser + OS list in Google Analytics report PHP is listed as a browser in Google Analytics. 50 sessions have been created. Obviously Analytics data is collected via
PHP is listed as a browser in Google Analytics. 50 sessions have been created.
Obviously Analytics data is collected via Javascript executed in the visitor's browser so what is PHP (a server-side language) doing in this list?!
My own server is PHP and there is a server-side script that records certain Events by pushing data into GA. I checked the Events report and sure enough, there was the exact same number 50, as the number of Unique Events.
So we can safely assume that these stats are actually about hits on the GA API. But why are my own server-side requests to Analytics being bundled in with data which should be about the users? I look at the Browser + OS report to learn about my site's Users, surely mixing in information about my server-side requests to the API is misleading?! PHP is not one of my users browsers, it is my own server pushing user data into my Analytics account.
Is there a some parameters I can add to the API requests? Should I be capturing the User Agent string myself and passing that to the GA API? If so, do I then capture the IP Address, language et cetera, the never ending list of things GA records. Can I just tell GA not to include the information about which server is hitting the API but instead, just the information given to the API?
More posts by @Barnes591
2 Comments
Sorted by latest first Latest Oldest Best
Sending a non-interaction parameter with the Event hit type seems to keep the sessions at 0. The only issue I see now is that the "New Users" column still has data in it. This does not affect the graph or the total number of hits/sessions/pageviews, but I wanted to note it.
The syntax for a non-interaction is 'ni' (boolean) where 1 is non-interaction, and 0 is interaction. I've just added this into all of my server-side event tracking with a default of true. This seems to have fixed most of the problem.
Here it is on the documentation page.
Hope this helps. It seems like not a lot of people are having this issue, so it's tough to find any clues/answers.
Very likely an automated script hitting your site and trigger analytics to fire. PHP can be a valid user agent, at least according to www.useragentstring.com/pages/useragentstring.php
I would drill down in to the PHP analytics and then view the location of those visitors, time on site, page views and more to try and determine if it's a script or person.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.