We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12ab052 commit e425f65Copy full SHA for e425f65
app/Http/Controllers/ExampleController.php
@@ -11,7 +11,7 @@ class ExampleController
11
public function __invoke(Client $client)
12
{
13
try {
14
- $userId = uniqid();
+ $userId = $_SESSION['userId'] ?? uniqid(); // $_SESSION['guestId'] here's for example. Always use some user id / guest id when sending event
15
$buttonColor = $client->experiments()->run($userId, 'button_color');
16
$client->statistics()->sendEvent(new EventDTO(
17
null,
0 commit comments