feat: Refinamiento del tracking de analiticas y actualizacion del dashboard admin
This commit is contained in:
@ -195,7 +195,7 @@ const getTripTypeLabel = (type: string) => {
|
||||
:href="`https://wa.me/${shuttle.contact_whatsapp.replace(/\+/g, '')}?text=Hola,%20me%20gustaría%20información%20sobre%20el%20shuttle%20de%20${shuttle.origin}%20a%20${shuttle.destination}`"
|
||||
target="_blank"
|
||||
class="flex justify-center items-center gap-2 p-3.5 bg-[#25D366] text-white rounded-xl font-bold hover:opacity-90 transition active:scale-95"
|
||||
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', item_id: shuttle.id, properties: { action: 'whatsapp' } })"
|
||||
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', entity_type: 'shuttle', entity_id: shuttle.id, entity_name: shuttle.company_name || 'shuttle', properties: { action: 'whatsapp' } })"
|
||||
>
|
||||
<span class="material-icons">chat</span>
|
||||
{{ t('shuttle.bookWhatsapp') }}
|
||||
@ -204,7 +204,7 @@ const getTripTypeLabel = (type: string) => {
|
||||
<a v-if="shuttle.phone_number"
|
||||
:href="`tel:${shuttle.phone_number}`"
|
||||
class="flex justify-center items-center gap-2 p-3.5 bg-[var(--bg-primary)] text-[var(--text-primary)] rounded-xl font-bold hover:bg-[var(--hover-bg)] transition active:scale-95 border border-border"
|
||||
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', item_id: shuttle.id, properties: { action: 'call' } })"
|
||||
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', entity_type: 'shuttle', entity_id: shuttle.id, entity_name: shuttle.company_name || 'shuttle', properties: { action: 'call' } })"
|
||||
>
|
||||
<span class="material-icons">phone_in_talk</span>
|
||||
{{ t('shuttle.callOperator') }}
|
||||
|
||||
@ -63,7 +63,9 @@ const getShiftsDisplay = (taxi: Taxi) => {
|
||||
const handleCall = (taxi: Taxi) => {
|
||||
analyticsService.logEvent({
|
||||
event_name: 'taxi_click',
|
||||
item_id: taxi.owner_name,
|
||||
entity_type: 'taxi',
|
||||
entity_id: taxi.id,
|
||||
entity_name: taxi.owner_name,
|
||||
properties: {
|
||||
action: 'call',
|
||||
taxi_id: taxi.id,
|
||||
|
||||
@ -23,7 +23,13 @@ const filteredShuttles = computed(() => {
|
||||
})
|
||||
})
|
||||
|
||||
const verDetalle = (shuttleId: string) => {
|
||||
const verDetalle = (shuttleId: string, shuttleName: string) => {
|
||||
analyticsService.logEvent({
|
||||
event_name: 'view_details',
|
||||
entity_type: 'shuttle',
|
||||
entity_id: shuttleId,
|
||||
entity_name: shuttleName
|
||||
})
|
||||
router.push({
|
||||
name: 'ShuttleDetalle',
|
||||
params: { id: shuttleId }
|
||||
@ -118,7 +124,7 @@ onUnmounted(() => {
|
||||
:key="shuttle.id"
|
||||
v-memo="[shuttle.id]"
|
||||
class="shuttle-card-premium glass-effect"
|
||||
@click="verDetalle(shuttle.id)"
|
||||
@click="verDetalle(shuttle.id, shuttle.company_name || `${shuttle.origin}-${shuttle.destination}`)"
|
||||
>
|
||||
<div class="card-image-wrap">
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user