Skip to content

Commit 5ae75f6

Browse files
author
Alex Westergaard
committed
Add shorthand explanation of consent and data flow
1 parent 59899cf commit 5ae75f6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ composer require alexwestergaard/php-ga4
2020

2121
- [GDPR Notice](#gdpr-notice)
2222
- [Getting started](#getting-started)
23+
- [Data flow](#data-flow)
2324
- [Events](#events)
2425
- [Default](#default)
2526
- [E-commerce](#e-commerce)
@@ -59,10 +60,18 @@ use AlexWestergaard\PhpGa4\Analytics;
5960
$analytics = Analytics::new(
6061
measurement_id: 'G-XXXXXXXX',
6162
api_secret: 'xYzzX_xYzzXzxyZxX',
62-
debug: true/false
63+
debug: true|false
6364
);
6465
```
6566

67+
### Data flow
68+
69+
1. Acquire proper GDPR Consent
70+
2. Client/GTAG.js sends session_start and first_visit to GA4
71+
3. GA4 sends _ga and _gid cookies to Client/GTAG.js
72+
4. Server uses _ga to populate events
73+
74+
6675
## Events
6776

6877
This is a list of prebuilt events as shown in the documentation. All events have the following parameters to locate trigger location of each event.

0 commit comments

Comments
 (0)