Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eloquent Viewable Laravel Package

cyrildewit/eloquent-viewable

Track page views on Eloquent models without third-party analytics. Record and count total or unique views, filter by date periods, order models by views, apply cooldowns, and optionally ignore crawlers. Stores each view as a DB record for flexible querying.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Development: Enables granular analytics for content-heavy applications (e.g., blogs, e-commerce product pages, or media platforms) without relying on third-party services like Google Analytics. Supports use cases like:
    • Tracking engagement metrics (e.g., "Most-viewed articles this week").
    • Personalization (e.g., "Recommended based on your recent views").
    • A/B testing (e.g., comparing view counts between two page variants).
  • Roadmap Prioritization:
    • Build vs. Buy: Justifies in-house development for analytics if privacy/compliance (e.g., GDPR) or customization (e.g., unique visitor tracking) is critical.
    • Scalability: Validates need for database-optimized solutions if traffic volume is high (e.g., >100K monthly views), requiring caching strategies or database indexing.
  • Monetization: Supports premium features like "Trending Now" sections or sponsored content placement based on view counts.
  • Data-Driven Decisions: Enables product teams to measure feature adoption (e.g., "How many users viewed the new checkout flow?").

When to Consider This Package

Adopt if:

  • Your application uses Eloquent models (e.g., Post, Product) and needs lightweight, self-hosted view tracking.
  • You require granular time-based queries (e.g., "Views in the last 7 days") or unique visitor tracking (via cookies/IP).
  • You’re avoiding third-party analytics due to cost, latency, or data sovereignty concerns.
  • Your team has moderate PHP/Laravel expertise to implement and optimize (e.g., caching, indexing).

Look elsewhere if:

  • You need real-time analytics dashboards (consider Laravel Scout + third-party tools like Mixpanel).
  • Your traffic is extremely high (>1M daily views), risking database bloat without aggressive optimization.
  • You require multi-dimensional segmentation (e.g., tracking views by device/location), which may need a dedicated analytics service.
  • Your stack isn’t Laravel/PHP (e.g., Node.js, Python).

How to Pitch It (Stakeholders)

For Executives: "This package lets us own our analytics data—no vendor lock-in, no privacy risks, and no egress fees. For [X] dollars in dev time, we’ll unlock features like ‘Trending Content’ or ‘Personalized Recommendations’ without relying on Google Analytics. It’s a force multiplier for our content/product teams to make data-driven decisions at scale."

For Engineering: *"A lightweight, Laravel-native solution for tracking views on Eloquent models with:

  • Flexible queries: Time ranges, unique visitors, and custom collections.
  • Performance safeguards: Built-in caching and cooldowns to prevent abuse.
  • Extensibility: Swap out components (e.g., crawler detection) or add custom visitor metadata. Tradeoff: Database growth scales with traffic, but we can mitigate this with indexing/caching. Ideal for [use case] where we need precision without third-party dependencies."*

For Product/Design: "Imagine surfacing ‘Most Viewed’ sections or ‘Recently Popular’ feeds—all powered by our own data. No more guessing what content resonates; we’ll measure it directly. Example: If we launch a new feature, we can instantly see adoption via view counts."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport