Skip to content

Commit 8a9919f

Browse files
authored
fix: custom param event tracking (#288)
1 parent 26af3d1 commit 8a9919f

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

source/includes/_tracking.md.erb

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ sdk.track("purchase", {
813813
order_price: 29999
814814
});
815815

816-
// Custom order tracking
816+
// Custom order properties tracking
817817
sdk.track('purchase', {
818818
'email': "john.doe@examplemail.com",
819819
'phone': "4400114527199",
@@ -1080,12 +1080,23 @@ curl 'https://<%= config[:api_endpoint] %>/push/custom' \
10801080
// Simple tracking
10811081
<%= config[:js_sdk_name] %>("track", "my_event");
10821082

1083+
// Tracking with extra parameters
1084+
<%= config[:js_sdk_name] %>("track", "my_event", {
1085+
"category": "event category",
1086+
"label": "event label",
1087+
"value": 100
1088+
});
1089+
10831090
// Tracking with custom parameters
10841091
<%= config[:js_sdk_name] %>("track", "my_event", {
1085-
category: "event category",
1086-
label: "event label",
1087-
value: 100
1092+
"category": "event category",
1093+
"label": "event label",
1094+
"value": 100,
1095+
"custom_param_1": "my param",
1096+
"other_custom_param_2": 365,
1097+
"and_bool_custom_param_3": false
10881098
});
1099+
10891100
```
10901101

10911102
```swift

0 commit comments

Comments
 (0)