Skip to content

Update GA4 Docs Session ID and Session Number #2925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 19, 2022
Merged

Conversation

Gavin-Fitzpatrick
Copy link
Contributor

Proposed changes

With the latest changes to the Google Measurement API, session data can now be sent to GA4 once the session_id and session_number are sent in the payload. Finding this data can be difficult for customers given that retrieving these values is not explicitly linked to the GA4 docs anywhere. This addition to our docs includes a working code example of how to retrieve these values from a site using gtag.

To test this code, I used the following GA4 property:
image
Installed the property on a locally hosted webpage:
image
Running the code in the console resulted in this output:
image

Matching the session ID and Number for the session_start event in the GA4 real-time report:
image
image

Merge timing

  • ASAP once approved

@stayseesong stayseesong added the content-update updates to content that are not new features, includes grammar fixes, added notes label May 19, 2022
@stayseesong stayseesong merged commit 79b61ad into develop May 19, 2022
@stayseesong stayseesong deleted the ga4-updates branch May 19, 2022 17:06
@github-actions
Copy link
Contributor

Thank you for your contribution! Your pull request is merged, but may take a day or two to appear on the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content-update updates to content that are not new features, includes grammar fixes, added notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants