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 00f1283 commit 29540f3Copy full SHA for 29540f3
src/Analytics.php
@@ -80,15 +80,15 @@ public function setUserId(string $id)
80
}
81
82
/**
83
- * @param int|float $microOrUnix
+ * @param int|float $microOrUnix time() or microtime(true)
84
*/
85
public function setTimestamp($microOrUnix)
86
{
87
if (!is_numeric($microOrUnix)) {
88
throw new GA4Exception("setTimestamp value must be numeric");
89
90
91
- $this->timestamp_micros = floor($microOrUnix * 1000);
+ $this->timestamp_micros = floor($microOrUnix * 1000000);
92
return $this;
93
94
0 commit comments