Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Retrieve Analytics Session ID from the browser

Avatar

Level 4

Hi community, 

Is there anyway to retrieve Analytics Session ID from the browser?

We need to capture the ID and send it to another system, for making some data match later.

Thanks,

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

There's no such thing.... what I provided is the closest you are going to get...

 

The visitor id will persist between visits, the visit number will persist within the same visit.

 

The combination of the two will create a unique code for each users' session.

 

There is nothing else... Adobe does NOT have a session id.

View solution in original post

5 Replies

Avatar

Community Advisor

What exactly is a "Session ID"... I've never heard of that for Adobe Analytics... This isn't a dimension that is captured (either through a standard dimension you can access, or a behind the scenes dimension that would be available in the Raw Data feeds).

 

Adobe doesn't "id" sessions... there is a Visit Number, which is available in both the standard dimensions that are collected automatically, and it's also available in raw data....

 

You could potentially use the Visitor ID stitched with the Visit Number to create a pseudo "session id"....

 

You can't really get access to the all time visit number, but you can get something close using this plugin:
https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getvisitnum.html?lang=...

 

To get the Visitor ID you can use the following script:

_satellite.getVisitorId().getMarketingCloudVisitorID()

 

Hopefully you can find a solution that will work for you.

Avatar

Level 4

Hi Jennifer.

Is this the same of Session ID? Because I think that will return something similar to User ID.

Avatar

Community Advisor

There is no "Session ID"...

 

The Visitor ID is a visitor ID, and it will be the same for all visits....

 

The Visit Num is the incremental visit number for the user (ie. visit number 1, visit number 2, visit number 3, etc)...

 

I am suggesting that you can create a "pseudo session id" by combining the two....

 

Let's say you have 2 users (you and me)

3d508edf-7a77-4f4a-9955-d9e4a30ae24e - you
f7b0cf59-c099-40fb-90ef-eb95a6a89b72 - me

 

Ever time either of us come to the site, that is our user id....

 

You come to the site 3 times, I come to the site 2 times...

 

You can't use the Visit Number alone to id the session, since you will have "1", "2" and "3"... and I will have "1" and "2" (which are not unique)

 

I am suggesting you concatenate the user id with the visit number:

 

You:

  • Visit 1 "3d508edf-7a77-4f4a-9955-d9e4a30ae24e|1"
  • Visit 2 "3d508edf-7a77-4f4a-9955-d9e4a30ae24e|2"
  • Visit 3 "3d508edf-7a77-4f4a-9955-d9e4a30ae24e|3"

etc

 

and for me:

  • Visit 1 "f7b0cf59-c099-40fb-90ef-eb95a6a89b72|1"
  • Visit 2 "f7b0cf59-c099-40fb-90ef-eb95a6a89b72|2"

 

This is the only way I can think of to uniquely identify a session... 

Avatar

Level 4

What I'm looking for is an ID for the visit, something that will change from one visit to the other, but persisted during a sigle visit. May be we don't have it out of the box, but I want to confirm it.

Avatar

Correct answer by
Community Advisor

There's no such thing.... what I provided is the closest you are going to get...

 

The visitor id will persist between visits, the visit number will persist within the same visit.

 

The combination of the two will create a unique code for each users' session.

 

There is nothing else... Adobe does NOT have a session id.