-
Notifications
You must be signed in to change notification settings - Fork 14
Add auto-tracking plugin #351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new auto-tracking plugin that automatically tracks product views, post views, and link openings using structured data (JSON-LD) embedded in web pages.
- Parses JSON-LD structured data to extract article and product information
- Automatically tracks
postViewed,productViewed, andlinkOpenedevents - Provides configuration options to disable specific tracking types
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/plugins/autoTracking/index.ts |
Main plugin implementation with event tracking logic |
src/plugins/autoTracking/structuredData.ts |
JSON-LD parsing and entity extraction utilities |
src/plug.ts |
Registers the autoTracking plugin factory |
test/plugins/autoTracking/index.test.ts |
Comprehensive tests for plugin functionality |
test/plugins/autoTracking/structuredData.test.ts |
Extensive tests for structured data parsing |
test/plug.test.ts |
Tests for plugin registration and configuration |
package.json |
Adds schema-dts dependency and updates ts-node version |
package-lock.json |
Lock file updates for new dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This PR adds a new plugin that automatically tracks product views, post views and link openings.
Checklist