File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 77use AlexWestergaard \PhpGa4 \Facade ;
88use AlexWestergaard \PhpGa4 \Exception \Ga4Exception ;
99
10+ /**
11+ * Analytics wrapper to contain UserProperties and Events to post on Google Analytics
12+ */
1013class Analytics extends Helper \IOHelper implements Facade \Type \AnalyticsType
1114{
1215 private Guzzle $ guzzle ;
Original file line number Diff line number Diff line change 55use AlexWestergaard \PhpGa4 \Helper ;
66use AlexWestergaard \PhpGa4 \Facade ;
77
8+ /**
9+ * Structured items for events that touch products
10+ */
811class Item extends Helper \IOHelper implements Facade \Type \ItemType
912{
1013 protected null |string $ item_id ;
Original file line number Diff line number Diff line change 44
55use AlexWestergaard \PhpGa4 \Helper ;
66
7+ /**
8+ * UserProperty allows you to add session/client properties that is not related to individual events
9+ * such as if they are a premium member or from a certain country perhaps.
10+ */
711class UserProperty extends Helper \UserPropertyHelper
812{
913 protected null |string $ name ;
1014 protected null |int |float |string $ value ;
1115
16+ /**
17+ * Set the name of the UserProperty
18+ *
19+ * @param string $name
20+ *
21+ * @return static
22+ */
23+ public function setName (string $ name ): static
24+ {
25+ return parent ::setName ($ name );
26+ }
27+
28+ /**
29+ * Set the value of the UserProperty
30+ *
31+ * @param int|float|string $value
32+ *
33+ * @return static
34+ */
1235 public function setValue (int |float |string $ value ): static
1336 {
1437 $ this ->value = $ value ;
You can’t perform that action at this time.
0 commit comments