Skip to content

Instantly share code, notes, and snippets.

@molavec
Created August 26, 2026 00:48
Show Gist options
  • Select an option

  • Save molavec/8533491cc40abb3a1e5288ef9f9e5ef9 to your computer and use it in GitHub Desktop.

Select an option

Save molavec/8533491cc40abb3a1e5288ef9f9e5ef9 to your computer and use it in GitHub Desktop.
3ho: funnel_step y eventos datalayer

step 1: attendess

//TODO: Añadir evento funnel_step para el paso 1 

step 2: pass

{
  event: "funnel_step",
  eventModel: {flow: "register", step: 2, step_name: "pass"},
  gtm.uniqueEventId: 18
}

step 3: extras

dataLayer.push({
  event: "funnel_step",
  eventModel: {flow: "register", step: 3, step_name: "extras"},
  gtm.uniqueEventId: 21
})

step 4: details

// TODO: cambiar eventModel por ecommerce
// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?hl=es-419&client_type=gtm
dataLayer.push({event: "begin_checkout", eventModel: {currency: "USD", value: 2515}, gtm.uniqueEventId: 23})

dataLayer.push({
  event: "funnel_step",
  eventModel: {flow: "register", step: 4, step_name: "details"},
  gtm.uniqueEventId: 24
})

step 5: payment

dataLayer.push({
  event: "funnel_step",
  eventModel: {flow: "register", step: 5, step_name: "payment"},
  gtm.uniqueEventId: 26
})


// TODO: cambiar eventModel por ecommerce
dataLayer.push({
  event: "add_payment_info",
  eventModel: {
    payment_type: "stripe",
    currency: "USD",
    value: 2515,
    items: [
      {item_id: "full", item_name: "Full Event · 7 days", quantity: 4, price: 625},
      {item_id: "registration_fee", item_name: "Registration fee", quantity: 1, price: 15}
    ]
  },
  gtm.uniqueEventId: 28
})

step 6: purchase

// TODO: Eliminar este purchase
dataLayer.push({
  event: "purchase",
  eventModel: {
    transaction_id: "0b103cb5-eaa4-4a99-b458-efa8113230c4",
    currency: "USD",
    value: 2515,
    items: [
      {item_id: "full", item_name: "Full Event · 7 days", quantity: 4, price: 625},
      {item_id: "registration_fee", item_name: "Registration fee", quantity: 1, price: 15}
    ]
  },
  gtm.uniqueEventId: 29
})

// TODO: Mantener éste
dataLayer.push({
  event: "purchase",
  event_id: "0b103cb5-eaa4-4a99-b458-efa8113230c4",
  ecommerce: {
    transaction_id: "0b103cb5-eaa4-4a99-b458-efa8113230c4",
    value: 2515,
    currency: "USD",
    items: [
      {item_id: "full", item_name: "Full Event · 7 days", quantity: 4, price: 625},
      {item_id: "registration_fee", item_name: "Registration fee", quantity: 1, price: 15}
    ]
  },
  gtm.uniqueEventId: 30
})


dataLayer.push({
  event: "funnel_step",
  eventModel: {flow: "register", step: 6, step_name: "camp_registration"},
  gtm.uniqueEventId: 31
})

step 7: confirmation

dataLayer.push({
  event: "funnel_step",
  eventModel: {flow: "register", step: 7, step_name: "confirmation"},
  gtm.uniqueEventId: 34
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment