Skip to content

Commit eb3bfad

Browse files
author
Alex Westergaard
committed
Update dataflow description
1 parent 4773171 commit eb3bfad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ $analytics = Analytics::new(
6767

6868
### Data flow
6969

70+
`session_id` > Google Analytics does not specify a required type of **session or user id**. You are free to use any kind of **unique identifier** you want; the catch, however, is that Google Analytics populates some internal data with `GTAG.js`, that is then referenced to their `_ga` cookie session id. Just be aware that `GTAG.js` is using *client-side Javascript* and can therefore have some **GDPR complications** as requests back to Google Analytics contains client information; such as their IP Address.
71+
7072
1. Acquire proper GDPR Consent
7173
2. Client/GTAG.js sends session_start and first_visit to GA4
72-
3. GA4 sends _ga and _gid cookies to Client/GTAG.js
73-
4. Server uses _ga to populate events
74+
3. GA4 sends _ga and _gid cookies back to Client/GTAG.js
75+
4. Server uses _ga (or _gid; or your unique session_id) to populate events
76+
77+
Note: It is entirely possible to push events to backend without acquiring the session cookies from Google Analytics; you will however lose information bundled inside the `GTAG.js` request if you do not figure out how to push that via backend too.
7478

7579
### Layers
7680

0 commit comments

Comments
 (0)