We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53f84e4 commit 2a1fe96Copy full SHA for 2a1fe96
src/Dto/SegmentPayload.php
@@ -24,10 +24,11 @@ class SegmentPayload extends DataTransferObject
24
25
public function toSegment(): array
26
{
27
- return array_merge([
+ return array_merge(
28
+ [
29
'event' => $this->name,
30
'properties' => $this->properties,
- 'anonymousId' => $this->actor ?? Str::uuid()->__toString()
31
+ 'anonymousId' => $this->actor ?? Str::uuid()->__toString(),
32
],
33
($this->actor ? ['userId' => $this->actor] : []),
34
($this->messageId ? ['messageId' => $this->messageId] : []),
@@ -68,7 +69,7 @@ public function messageId(?string $messageId): self
68
69
70
return $this;
71
}
-
72
+
73
public function track(): bool
74
75
return $this->sent = Segment::track($this->toSegment());
0 commit comments