@flisk/analyze-tracking 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/pr-check.yml +17 -0
- package/README.md +16 -0
- package/package.json +1 -1
- package/schema.json +2 -0
- package/src/analyze/helpers.js +4 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: PR Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-node@v4
|
|
14
|
+
with:
|
|
15
|
+
node-version: 20
|
|
16
|
+
- run: npm ci
|
|
17
|
+
- run: npm test
|
package/README.md
CHANGED
|
@@ -98,6 +98,22 @@ posthog.capture('<event_name>', {
|
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
|
|
101
|
+
#### Pendo
|
|
102
|
+
```js
|
|
103
|
+
pendo.track('<event_name>', {
|
|
104
|
+
<event_parameters>
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
#### Heap
|
|
110
|
+
```js
|
|
111
|
+
heap.track('<event_name>', {
|
|
112
|
+
<event_parameters>
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
|
|
101
117
|
#### Snowplow
|
|
102
118
|
```js
|
|
103
119
|
snowplow('trackStructEvent', {
|
package/package.json
CHANGED
package/schema.json
CHANGED
package/src/analyze/helpers.js
CHANGED
|
@@ -15,6 +15,8 @@ function detectSourceJs(node) {
|
|
|
15
15
|
if (objectName === 'rudderanalytics' && methodName === 'track') return 'rudderstack';
|
|
16
16
|
if (objectName === 'mParticle' && methodName === 'logEvent') return 'mparticle';
|
|
17
17
|
if (objectName === 'posthog' && methodName === 'capture') return 'posthog';
|
|
18
|
+
if (objectName === 'pendo' && methodName === 'track') return 'pendo';
|
|
19
|
+
if (objectName === 'heap' && methodName === 'track') return 'heap';
|
|
18
20
|
} else if (node.callee.type === 'Identifier' && node.callee.name === 'snowplow') {
|
|
19
21
|
return 'snowplow';
|
|
20
22
|
}
|
|
@@ -37,6 +39,8 @@ function detectSourceTs(node) {
|
|
|
37
39
|
if (objectName === 'rudderanalytics' && methodName === 'track') return 'rudderstack';
|
|
38
40
|
if (objectName === 'mParticle' && methodName === 'logEvent') return 'mparticle';
|
|
39
41
|
if (objectName === 'posthog' && methodName === 'capture') return 'posthog';
|
|
42
|
+
if (objectName === 'pendo' && methodName === 'track') return 'pendo';
|
|
43
|
+
if (objectName === 'heap' && methodName === 'track') return 'heap';
|
|
40
44
|
} else if (ts.isIdentifier(node.expression) && node.expression.escapedText === 'snowplow') {
|
|
41
45
|
return 'snowplow';
|
|
42
46
|
}
|