Retrieve Analytics Session ID from the browser | Community
Skip to main content
OscarMartinezM
May 24, 2023
Solved

Retrieve Analytics Session ID from the browser

  • May 24, 2023
  • 1 reply
  • 5274 views

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,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

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.


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.

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 24, 2023

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=en

 

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.

OscarMartinezM
May 25, 2023

Hi Jennifer.

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

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 25, 2023

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...