-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new tracker for React Native (#1371)
- Loading branch information
1 parent
967733d
commit 0a00be2
Showing
291 changed files
with
14,235 additions
and
4,597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,10 @@ jobs: | |
working-directory: ./trackers/node-tracker | ||
run: api-extractor run | ||
|
||
- name: Check for API changes to @snowplow/react-native-tracker | ||
working-directory: ./trackers/react-native-tracker | ||
run: api-extractor run | ||
|
||
- name: Check bundle size using bundlemon | ||
run: npx [email protected] | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...cs/docs/browser-tracker/markdown/browser-tracker.coreplugin.deactivateplugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/browser-tracker](./browser-tracker.md) > [CorePlugin](./browser-tracker.coreplugin.md) > [deactivatePlugin](./browser-tracker.coreplugin.deactivateplugin.md) | ||
|
||
## CorePlugin.deactivatePlugin property | ||
|
||
Called when the tracker is being destroyed. Should be used to clean up any resources or listeners that the plugin has created. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
deactivatePlugin?: (core: TrackerCore) => void; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
api-docs/docs/browser-tracker/markdown/browser-tracker.trackercore.deactivate.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/browser-tracker](./browser-tracker.md) > [TrackerCore](./browser-tracker.trackercore.md) > [deactivate](./browser-tracker.trackercore.deactivate.md) | ||
|
||
## TrackerCore.deactivate() method | ||
|
||
Deactivate tracker core including all plugins. This is useful for cleaning up resources or listeners that have been created. Once deactivated, the tracker won't be able to track any events. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
deactivate(): void; | ||
``` | ||
<b>Returns:</b> | ||
|
||
void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
api-docs/docs/node-tracker/markdown/node-tracker.coreplugin.deactivateplugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/node-tracker](./node-tracker.md) > [CorePlugin](./node-tracker.coreplugin.md) > [deactivatePlugin](./node-tracker.coreplugin.deactivateplugin.md) | ||
|
||
## CorePlugin.deactivatePlugin property | ||
|
||
Called when the tracker is being destroyed. Should be used to clean up any resources or listeners that the plugin has created. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
deactivatePlugin?: (core: TrackerCore) => void; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
api-docs/docs/node-tracker/markdown/node-tracker.trackercore.deactivate.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/node-tracker](./node-tracker.md) > [TrackerCore](./node-tracker.trackercore.md) > [deactivate](./node-tracker.trackercore.deactivate.md) | ||
|
||
## TrackerCore.deactivate() method | ||
|
||
Deactivate tracker core including all plugins. This is useful for cleaning up resources or listeners that have been created. Once deactivated, the tracker won't be able to track any events. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
deactivate(): void; | ||
``` | ||
<b>Returns:</b> | ||
|
||
void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) | ||
|
||
## API Reference | ||
|
||
## Packages | ||
|
||
| Package | Description | | ||
| --- | --- | | ||
| [@snowplow/react-native-tracker](./react-native-tracker.md) | | | ||
|
13 changes: 13 additions & 0 deletions
13
...eact-native-tracker/markdown/react-native-tracker.conditionalcontextprovider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [ConditionalContextProvider](./react-native-tracker.conditionalcontextprovider.md) | ||
|
||
## ConditionalContextProvider type | ||
|
||
Conditional context providers are two element arrays used to decide when to attach contexts, where: - the first element is some conditional criterion - the second element is any number of context primitives | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
type ConditionalContextProvider = FilterProvider | RuleSetProvider; | ||
``` |
13 changes: 13 additions & 0 deletions
13
api-docs/docs/react-native-tracker/markdown/react-native-tracker.contextfilter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [ContextFilter](./react-native-tracker.contextfilter.md) | ||
|
||
## ContextFilter type | ||
|
||
A context filter is a user-supplied callback that is evaluated for each event to determine if the context associated with the filter should be attached to the event | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
type ContextFilter = (args?: ContextEvent) => boolean; | ||
``` |
13 changes: 13 additions & 0 deletions
13
...ocs/docs/react-native-tracker/markdown/react-native-tracker.contextgenerator.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [ContextGenerator](./react-native-tracker.contextgenerator.md) | ||
|
||
## ContextGenerator type | ||
|
||
A context generator is a user-supplied callback that is evaluated for each event to allow an additional context to be dynamically attached to the event | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
type ContextGenerator = (args?: ContextEvent) => SelfDescribingJson | SelfDescribingJson[] | undefined; | ||
``` |
13 changes: 13 additions & 0 deletions
13
...ocs/docs/react-native-tracker/markdown/react-native-tracker.contextprimitive.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [ContextPrimitive](./react-native-tracker.contextprimitive.md) | ||
|
||
## ContextPrimitive type | ||
|
||
A context primitive is either a self-describing JSON or a context generator | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
type ContextPrimitive = SelfDescribingJson | ContextGenerator; | ||
``` |
11 changes: 11 additions & 0 deletions
11
.../react-native-tracker/markdown/react-native-tracker.coreconfiguration.base64.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CoreConfiguration](./react-native-tracker.coreconfiguration.md) > [base64](./react-native-tracker.coreconfiguration.base64.md) | ||
|
||
## CoreConfiguration.base64 property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
base64?: boolean; | ||
``` |
11 changes: 11 additions & 0 deletions
11
...eact-native-tracker/markdown/react-native-tracker.coreconfiguration.callback.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CoreConfiguration](./react-native-tracker.coreconfiguration.md) > [callback](./react-native-tracker.coreconfiguration.callback.md) | ||
|
||
## CoreConfiguration.callback property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
callback?: (PayloadData: PayloadBuilder) => void; | ||
``` |
11 changes: 11 additions & 0 deletions
11
...t-native-tracker/markdown/react-native-tracker.coreconfiguration.coreplugins.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CoreConfiguration](./react-native-tracker.coreconfiguration.md) > [corePlugins](./react-native-tracker.coreconfiguration.coreplugins.md) | ||
|
||
## CoreConfiguration.corePlugins property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
corePlugins?: Array<CorePlugin>; | ||
``` |
22 changes: 22 additions & 0 deletions
22
...cs/docs/react-native-tracker/markdown/react-native-tracker.coreconfiguration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CoreConfiguration](./react-native-tracker.coreconfiguration.md) | ||
|
||
## CoreConfiguration interface | ||
|
||
The configuration object for the tracker core library | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
interface CoreConfiguration | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [base64?](./react-native-tracker.coreconfiguration.base64.md) | boolean | <i>(Optional)</i> | | ||
| [callback?](./react-native-tracker.coreconfiguration.callback.md) | (PayloadData: PayloadBuilder) => void | <i>(Optional)</i> | | ||
| [corePlugins?](./react-native-tracker.coreconfiguration.coreplugins.md) | Array<CorePlugin> | <i>(Optional)</i> | | ||
|
18 changes: 18 additions & 0 deletions
18
...t-native-tracker/markdown/react-native-tracker.coreplugin.activatecoreplugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CorePlugin](./react-native-tracker.coreplugin.md) > [activateCorePlugin](./react-native-tracker.coreplugin.activatecoreplugin.md) | ||
|
||
## CorePlugin.activateCorePlugin property | ||
|
||
Called when the plugin is initialised during the trackerCore construction | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
activateCorePlugin?: (core: TrackerCore) => void; | ||
``` | ||
|
||
## Remarks | ||
|
||
Use to capture the specific core instance for each instance of a core plugin | ||
|
13 changes: 13 additions & 0 deletions
13
...ocs/react-native-tracker/markdown/react-native-tracker.coreplugin.aftertrack.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CorePlugin](./react-native-tracker.coreplugin.md) > [afterTrack](./react-native-tracker.coreplugin.aftertrack.md) | ||
|
||
## CorePlugin.afterTrack property | ||
|
||
Called just after the trackerCore callback fires | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
afterTrack?: (payload: Payload) => void; | ||
``` |
13 changes: 13 additions & 0 deletions
13
...cs/react-native-tracker/markdown/react-native-tracker.coreplugin.beforetrack.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CorePlugin](./react-native-tracker.coreplugin.md) > [beforeTrack](./react-native-tracker.coreplugin.beforetrack.md) | ||
|
||
## CorePlugin.beforeTrack property | ||
|
||
Called before the `filter` method is called and before the trackerCore callback fires (if the filter passes) | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
beforeTrack?: (payloadBuilder: PayloadBuilder) => void; | ||
``` |
13 changes: 13 additions & 0 deletions
13
.../docs/react-native-tracker/markdown/react-native-tracker.coreplugin.contexts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CorePlugin](./react-native-tracker.coreplugin.md) > [contexts](./react-native-tracker.coreplugin.contexts.md) | ||
|
||
## CorePlugin.contexts property | ||
|
||
Called when constructing the context for each event Useful for adding additional context to events | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
contexts?: () => SelfDescribingJson[]; | ||
``` |
13 changes: 13 additions & 0 deletions
13
...act-native-tracker/markdown/react-native-tracker.coreplugin.deactivateplugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@snowplow/react-native-tracker](./react-native-tracker.md) > [CorePlugin](./react-native-tracker.coreplugin.md) > [deactivatePlugin](./react-native-tracker.coreplugin.deactivateplugin.md) | ||
|
||
## CorePlugin.deactivatePlugin property | ||
|
||
Called when the tracker is being destroyed. Should be used to clean up any resources or listeners that the plugin has created. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
deactivatePlugin?: (core: TrackerCore) => void; | ||
``` |
Oops, something went wrong.