diff --git a/README.md b/README.md index b7418aa..3ff9e57 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,22 @@ posthog.capture('', { ``` +#### Pendo +```js +pendo.track('', { + +}); +``` + + +#### Heap +```js +heap.track('', { + +}); +``` + + #### Snowplow ```js snowplow('trackStructEvent', { diff --git a/package-lock.json b/package-lock.json index 71113ea..af026a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flisk/analyze-tracking", - "version": "0.2.1", + "version": "0.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@flisk/analyze-tracking", - "version": "0.2.1", + "version": "0.2.2", "license": "MIT", "dependencies": { "@typescript-eslint/parser": "^8.1.0", diff --git a/package.json b/package.json index 0e209d4..e5ff0fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flisk/analyze-tracking", - "version": "0.2.1", + "version": "0.2.2", "description": "Analyzes tracking code in a project and generates data schemas", "main": "src/index.js", "bin": { diff --git a/schema.json b/schema.json index d895f19..7973284 100644 --- a/schema.json +++ b/schema.json @@ -64,6 +64,8 @@ "rudderstack", "mparticle", "posthog", + "pendo", + "heap", "snowplow", "unknown" ], diff --git a/src/analyze/helpers.js b/src/analyze/helpers.js index ad6ccc8..68e7b87 100644 --- a/src/analyze/helpers.js +++ b/src/analyze/helpers.js @@ -15,6 +15,8 @@ function detectSourceJs(node) { if (objectName === 'rudderanalytics' && methodName === 'track') return 'rudderstack'; if (objectName === 'mParticle' && methodName === 'logEvent') return 'mparticle'; if (objectName === 'posthog' && methodName === 'capture') return 'posthog'; + if (objectName === 'pendo' && methodName === 'track') return 'pendo'; + if (objectName === 'heap' && methodName === 'track') return 'heap'; } else if (node.callee.type === 'Identifier' && node.callee.name === 'snowplow') { return 'snowplow'; } @@ -37,6 +39,8 @@ function detectSourceTs(node) { if (objectName === 'rudderanalytics' && methodName === 'track') return 'rudderstack'; if (objectName === 'mParticle' && methodName === 'logEvent') return 'mparticle'; if (objectName === 'posthog' && methodName === 'capture') return 'posthog'; + if (objectName === 'pendo' && methodName === 'track') return 'pendo'; + if (objectName === 'heap' && methodName === 'track') return 'heap'; } else if (ts.isIdentifier(node.expression) && node.expression.escapedText === 'snowplow') { return 'snowplow'; }