@@ -25,7 +25,12 @@ use SecureNative\sdk\EventTypes;
2525#### Initializing SDK
2626
2727``` php
28- SecureNative::init("YOUR_API_KEY", new SecureNativeOptions());
28+ $options = new SecureNativeOptions();
29+
30+ $options->setMaxEvents(10);
31+ $options->setLogLevel("error");
32+
33+ SecureNative::init("YOUR_API_KEY", $options);
2934```
3035
3136| Option | Type | Optional | Default Value | Description |
@@ -40,31 +45,31 @@ SecureNative::init("YOUR_API_KEY", new SecureNativeOptions());
4045## Event tracking
4146
4247```
43- $context = SecureNative::contextFromContext();
44-
4548SecureNative::track(array(
4649 'event' => EventTypes::LOG_IN,
47- 'context' => $context ,
48- 'userId' => '556595 ',
50+ 'context' => SecureNative::contextFromContext() ,
51+ 'userId' => '1234 ',
4952 'userTraits' => (object)[
50- 'name' => 'Your name ',
51- 'email' => 'test@test .com'
53+ 'name' => 'Your Name ',
54+ 'email' => 'name@gmail .com'
5255 ],
5356 // Custom properties
5457 'properties' => (object)[
55- "prop1" => "test",
56- "prop2" => 3
58+ "prop1" => "CUSTOM_PARAM_VALUE",
59+ "prop2" => true,
60+ "prop3" => 3
5761 ]
5862));
5963
6064or
6165
6266$ver = SecureNative::verify(array(
6367 'event' => EventTypes::VERIFY,
68+ 'userId' => '1234',
6469 'context' => SecureNative::contextFromContext()
6570 'userTraits' => (object)[
66- 'name' => 'Your name ',
67- 'email' => 'amit@phptest .com'
71+ 'name' => 'Your Name ',
72+ 'email' => 'name@gmail .com'
6873 ]
6974));
7075```
0 commit comments