feat: Refinamiento del tracking de analiticas y actualizacion del dashboard admin
This commit is contained in:
@ -50,19 +50,23 @@ function openCoupon(coupon: Coupon) {
|
||||
showRedeemModal.value = true
|
||||
analyticsService.logEvent({
|
||||
event_name: 'promo_view',
|
||||
item_id: coupon.title,
|
||||
properties: { coupon_id: coupon.id, business: coupon.business?.name }
|
||||
entity_type: 'coupon',
|
||||
entity_id: coupon.id,
|
||||
entity_name: coupon.title,
|
||||
properties: { business: coupon.business?.name }
|
||||
})
|
||||
}
|
||||
|
||||
function handleDirections() {
|
||||
if (!selectedCoupon.value) return
|
||||
analyticsService.logEvent({
|
||||
event_name: 'promo_click',
|
||||
item_id: 'directions_' + selectedCoupon.value.business?.name,
|
||||
event_name: 'location_click',
|
||||
entity_type: 'coupon',
|
||||
entity_id: selectedCoupon.value.id,
|
||||
entity_name: selectedCoupon.value.title,
|
||||
properties: {
|
||||
coupon_id: selectedCoupon.value.id,
|
||||
action: 'get_directions'
|
||||
action: 'get_directions',
|
||||
business: selectedCoupon.value.business?.name
|
||||
}
|
||||
})
|
||||
window.open(`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(selectedCoupon.value.business?.address || selectedCoupon.value.business?.name || '')}`, '_blank')
|
||||
|
||||
Reference in New Issue
Block a user