Class: Vendors::GoogleReserve::ConversionTrackingWorker
- Inherits:
-
ApplicationWorker
- Object
- ApplicationWorker
- Vendors::GoogleReserve::ConversionTrackingWorker
- Defined in:
- app/workers/vendors/google_reserve/conversion_tracking_worker.rb
Overview
ConversionTrackingWorker is a Sidekiq worker that handles Google Reserve conversion event tracking
This worker sends conversion events to Google when reservations are created through Google Reserve, enabling Google to track the effectiveness of their reservation integration and providing attribution data for restaurant performance metrics.
Job Configuration
-
Queue: :critical (high priority processing)
-
Retry: 2 attempts on failure
-
Lock: :until_executed to prevent duplicate concurrent executions
-
Backtrace: enabled for better error debugging
Process Overview
-
Receives a reservation_id parameter when enqueued
-
Delegates to VendorsService::GoogleReserve::ConversionTrackingService
-
Service validates reservation and sends conversion event to Google
Dependencies
-
VendorsService::GoogleReserve::ConversionTrackingService: Contains all business logic
-
Reservation model: Must exist and be valid for Google Reserve conversion tracking
Usage
Vendors::GoogleReserve::ConversionTrackingWorker.perform_async(reservation.id)
Instance Method Summary collapse
-
#perform(reservation_id) ⇒ void
Main entry point for Google Reserve conversion tracking Delegates to VendorsService::GoogleReserve::ConversionTrackingService.
Instance Method Details
#perform(reservation_id) ⇒ void
This method returns an undefined value.
Main entry point for Google Reserve conversion tracking Delegates to VendorsService::GoogleReserve::ConversionTrackingService
34 35 36 37 |
# File 'app/workers/vendors/google_reserve/conversion_tracking_worker.rb', line 34 def perform(reservation_id) service = VendorsService::GoogleReserve::ConversionTrackingService.new(reservation_id) service.send_conversion_event end |