File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -44,5 +44,25 @@ public function setPageTitle(string $title);
4444 */
4545 public function setScreenResolution (string $ wxh );
4646
47+ /**
48+ * In order for user activity to display in reports like Realtime, \
49+ * "session_id" must be supplied as part of the params for an event. \
50+ * The "session_id" is supplied from the reserved "session_start" event.
51+ *
52+ * @var session_id
53+ * @param string $id eg. "123"
54+ */
55+ public function setSessionId (string $ id );
56+
57+ /**
58+ * In order for user activity to display in reports like Realtime, \
59+ * "engagement_time_msec" must be supplied as part of the params for an event. \
60+ * The "engagement_time_msec" parameter should reflect the event's engagement time in milliseconds.
61+ *
62+ * @var engagement_time_msec
63+ * @param string $msec eg. '150' for 150 milliseconds
64+ */
65+ public function setEngagementTimeMSec (int $ msec );
66+
4767 public function toArray (): array ;
4868}
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ abstract class EventHelper extends IOHelper implements EventType
1515 protected null |string $ page_title ;
1616 protected null |string $ screen_resolution ;
1717
18+ protected null |string $ session_id ;
19+ protected null |int $ engagement_time_msec ;
20+
1821 protected array $ campaign = [];
1922
2023 public function setLanguage (string $ lang )
@@ -60,6 +63,18 @@ public function setEventPage(DefaultEventParamsType $page)
6063 return $ this ;
6164 }
6265
66+ public function setSessionId (string $ id )
67+ {
68+ $ this ->session_id = $ id ;
69+ return $ this ;
70+ }
71+
72+ public function setEngagementTimeMSec (int $ msec )
73+ {
74+ $ this ->engagement_time_msec = $ msec ;
75+ return $ this ;
76+ }
77+
6378 public function toArray (): array
6479 {
6580 $ return = [];
You can’t perform that action at this time.
0 commit comments