Skip to content

Conversation

@marcospassos
Copy link
Member

Summary

This PR adds a new plugin that automatically tracks product views, post views and link openings.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@croct/plug@351

commit: a3a9c04

Copy link

Copilot AI left a 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, and linkOpened events
  • 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.

renan628
renan628 previously approved these changes Nov 13, 2025
@croct-tech croct-tech deleted a comment from renan628 Nov 13, 2025
@marcospassos marcospassos merged commit 9ca209f into master Nov 13, 2025
10 checks passed
@marcospassos marcospassos deleted the auto-tracking branch November 13, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants