You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Server Side Tagging is not supposed to replace the frontend Client and session i
49
49
4. Server uses `_ga` (or `_gid`) to send/populate events
50
50
- Eg. GenerateLead, Purchase, Refund and other backend handled events.
51
51
52
-
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. You can replace the `_ga` and `_gid` sessions with your own uniquely generated id.
52
+
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. You can replace the `_ga` and `_gid` sessions with your own uniquely generated id.
53
53
54
54
All requests should follow this structure and contain at least 1 event for Google Analytics to accept it.
This library is built for backend server side tracking, but you will probably trigger most events through frontend with Javascript or Websockets. There will be 2 examples, one as pure backend for logged/queued events and one for frontend to backend communication.
137
+
This library is built for backend server side tracking, but you will probably trigger most events through frontend with Javascript or Websockets.
138
+
There will be 2 examples, one as pure backend for logged/queued events and one for frontend to backend communication.
138
139
139
140
### Logging / Queue
140
141
141
142
```php
143
+
// require vendor/autoload.php
144
+
142
145
use AlexWestergaard\PhpGa4\Exception;
143
146
use AlexWestergaard\PhpGa4\Analytics;
144
147
use AlexWestergaard\PhpGa4\Event;
145
148
use AlexWestergaard\PhpGa4\Item;
146
149
147
-
// require vendor/autoload.php
148
-
149
150
$visitors = getVisitorsAndEvents(); // pseudo function, make your own logic here
0 commit comments