Skip to content

Commit 1f0d8ff

Browse files
author
Paul Boocock
committed
Add note on more complex tracking
1 parent 2b82c48 commit 1f0d8ff

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

flutter/web/slide_puzzle/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Two examples of tracking are in this repository:
4747

4848
Accessing the Snowplow JavaScript Tracker is done with the following lines:
4949

50-
```dart
50+
```Dart
5151
@JS()
5252
library snowplow;
5353
@@ -59,9 +59,16 @@ external void snowplow(String method);
5959

6060
and can then be used:
6161

62-
```dart
62+
```Dart
6363
snowplow('trackPageView');
6464
```
6565

66+
if you wish to call more complex Snowplow tracking methods you will need to extend your external snowplow definition:
67+
68+
```Dart
69+
@JS('window.snowplow')
70+
external void snowplow(String method, [dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5, dynamic arg6]);
71+
```
72+
6673
[install]: https://flutter.dev/docs/get-started/install
6774
[samples]: https://flutter.github.io/samples/

0 commit comments

Comments
 (0)