Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Session Site tracking


#1

Hello,

Basically, we are looking into the site tracking, from the time a user visits out the site and browses around, I would like to have all that data.

  1. How do I get session ID of the user ?

  2. How do I get all the data performed by that particular session from the time he logins in and logout or till session expires?

Thanks
Mahesh


#2

Hi, @mahesh.k: You may find this document helpful: https://docs.newrelic.com/docs/browser/new-relic-browser/page-load-timing-resources/session-tracking

By default, session IDs are anonymous. To correlate a session ID with an individual user, you will have to add a custom attribute, such as username or account number.

If you know a session ID, you may view all the browser activity for that session in Insights:

SELECT * FROM PageView WHERE session = 'session-id-here'

#3

I pulled PHPSession ID from browser and ran the above query but i got error “There is no content to display”

SELECT * FROM PageView WHERE session = ‘3vhks758mmo7gvl6rr948jgvn1’


#4

It is not the PHPSession ID, it is a custom ID generated by the Browser agent. I don’t think it is possible for you to see it in your browser.

To see the IDs, go to Insights and execute the following query:

SELECT count(*) FROM PageView FACET session

Then select one of the session IDs and issue this query:

SELECT * FROM PageView WHERE session = 'session-id-here'

#5

If you want to use the PHPSession ID, you can pass it as a custom attribute.