@@ -77,36 +77,32 @@ You may download the `sp.js` file from the Releases section Github, self-host it
77
77
To track events, simply call their corresponding functions given the event data:
78
78
79
79
``` javascript
80
- trackWebViewEvent ({
81
- properties: {
82
- eventName: ' ue' ,
83
- trackerVersion: ' webview' ,
84
- },
80
+ trackSelfDescribingEvent ({
85
81
event : {
86
- schema:
87
- ' iglu:com.snowplowanalytics.snowplow/button_click/jsonschema/1-0-0' ,
88
- data: {
89
- label: ' webview test' ,
90
- },
91
- },
92
- });
82
+ schema: ' iglu:com.example_company/save_game/jsonschema/1-0-2' ,
83
+ data: {
84
+ ' saveId' : ' 4321' ,
85
+ ' level' : 23 ,
86
+ ' difficultyLevel' : ' HARD' ,
87
+ ' dlContent' : true
88
+ }
89
+ }
90
+ });
93
91
```
94
92
95
93
In case you loaded the tracker using the Snowplow tag, you will be able to access the APIs using ` window.snowplow ` :
96
94
97
95
``` javascript
98
- window .snowplow (' trackWebViewEvent' , {
99
- properties: {
100
- eventName: ' ue' ,
101
- trackerVersion: ' webview' ,
102
- },
96
+ window .snowplow (' trackSelfDescribingEvent' , {
103
97
event : {
104
- schema:
105
- ' iglu:com.snowplowanalytics.snowplow/button_click/jsonschema/1-0-0' ,
106
- data: {
107
- label: ' webview test' ,
108
- },
109
- },
98
+ schema: ' iglu:com.example_company/save_game/jsonschema/1-0-2' ,
99
+ data: {
100
+ ' saveId' : ' 4321' ,
101
+ ' level' : 23 ,
102
+ ' difficultyLevel' : ' HARD' ,
103
+ ' dlContent' : true
104
+ }
105
+ }
110
106
});
111
107
```
112
108
@@ -142,12 +138,12 @@ limitations under the License.
142
138
[ website ] : https://snowplow.io
143
139
[ snowplow ] : https://github.com/snowplow/snowplow
144
140
[ docs ] : https://docs.snowplow.io/
145
- [ webview-docs ] : https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications /webview-tracker/
146
- [ mobile-tracker-setup-docs ] : https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications /mobile-trackers/installation-and-set-up/
141
+ [ webview-docs ] : https://docs.snowplow.io/docs/sources/trackers /webview-tracker/
142
+ [ mobile-tracker-setup-docs ] : https://docs.snowplow.io/docs/sources/trackers /mobile-trackers/installation-and-set-up/
147
143
148
- [ ios-tracker ] : https://github.com/snowplow/snowplow-objc -tracker
144
+ [ ios-tracker ] : https:/// github.com/snowplow/snowplow-ios -tracker
149
145
[ android-tracker ] : https://github.com/snowplow/snowplow-android-tracker
150
- [ react-native-tracker ] : https://docs. snowplow.io/docs/collecting-data/collecting-from-own-applications/react-native- tracker/
146
+ [ react-native-tracker ] : https://github.com/ snowplow/snowplow-javascript- tracker
151
147
152
148
[ gh-actions ] : https://github.com/snowplow-incubator/snowplow-webview-tracker/actions/workflows/build.yml
153
149
[ gh-actions-image ] : https://github.com/snowplow-incubator/snowplow-webview-tracker/actions/workflows/build.yml/badge.svg
0 commit comments