원클릭으로
ranetrace-event-tracking
Track custom application events like sales, signups, and user actions with Ranetrace's privacy-first event system.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Track custom application events like sales, signups, and user actions with Ranetrace's privacy-first event system.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Send application logs to Ranetrace via the auto-registered logging channel, and integrate it with Laravel's logging stack.
Set up and schedule the Ranetrace worker to flush buffered errors, events, logs, analytics, and JavaScript errors to the API.
Capture client-side JavaScript errors with breadcrumbs, deduplication, and sampling using Ranetrace's Blade directive.
Set up and configure Ranetrace's privacy-first website analytics with bot detection, path filtering, and custom request filters.
Track, investigate, and manage application errors with Ranetrace, including MCP tools for AI-assisted debugging.
| name | ranetrace-event-tracking |
| description | Track custom application events like sales, signups, and user actions with Ranetrace's privacy-first event system. |
Use this skill when implementing custom event tracking for analytics, e-commerce metrics, user behavior tracking, or any application-specific events.
Ranetrace::trackEvent(string $eventName, array $properties = [], int|string|null $userId = null, bool $validate = true) — low-level tracking ($userId accepts int or string for UUID models; $validate: false skips snake_case name validation)RanetraceEvents — convenience methods with built-in validationThe EventTracker class provides constants for common events:
use Ranetrace\Laravel\Events\EventTracker;
EventTracker::PRODUCT_ADDED_TO_CART // 'product_added_to_cart'
EventTracker::PRODUCT_REMOVED_FROM_CART
EventTracker::CART_VIEWED
EventTracker::CHECKOUT_STARTED
EventTracker::CHECKOUT_COMPLETED
EventTracker::SALE // 'sale'
EventTracker::USER_REGISTERED // 'user_registered'
EventTracker::USER_LOGGED_IN
EventTracker::USER_LOGGED_OUT
EventTracker::PAGE_VIEW
EventTracker::SEARCH
EventTracker::NEWSLETTER_SIGNUP
EventTracker::CONTACT_FORM_SUBMITTED
use Ranetrace\Laravel\Facades\RanetraceEvents;
// Track a sale
RanetraceEvents::sale(
orderId: 'ORD-123',
totalAmount: 99.99,
products: [['id' => 'PROD-1', 'name' => 'Widget', 'price' => 49.99]],
currency: 'EUR',
);
// Track product added to cart
RanetraceEvents::productAddedToCart(
productId: 'PROD-1',
productName: 'Widget',
price: 49.99,
quantity: 2,
category: 'Electronics',
);
// Track user registration (auto-detects authenticated user if $userId is null)
RanetraceEvents::userRegistered(userId: $user->id);
// Track user login
RanetraceEvents::userLoggedIn();
// Track a specific page view (distinct from website analytics)
RanetraceEvents::pageView('pricing-page');
// Custom event with validation (enforces naming rules)
RanetraceEvents::custom('feature_toggled', [
'feature' => 'dark_mode',
'enabled' => true,
]);
// Custom event without validation (advanced use only)
RanetraceEvents::customUnsafe('My.Custom.Event', $properties);
Event names are validated by default and must:
snake_case format (lowercase with underscores)Valid: user_registered, checkout_completed, feature_toggled
Invalid: UserRegistered, a, 123_event, my-event
// config/ranetrace.php
'events' => [
'enabled' => env('RANETRACE_EVENTS_ENABLED', true),
'queue' => env('RANETRACE_EVENTS_QUEUE', true),
'queue_name' => env('RANETRACE_EVENTS_QUEUE_NAME', 'default'),
'timeout' => env('RANETRACE_EVENTS_TIMEOUT', 10),
],
Each event includes:
php artisan ranetrace:test-events