Skip to main content
View Categories

Meta InitiateCheckout fails with fbq not defined

Your browser console shows fbq is not defined on the checkout page, and the Meta InitiateCheckout event does not arrive in Events Manager.

Why this happens. HomeRunner pushes the begin_checkout event to the data layer as soon as the checkout page starts loading, before the browser reaches DOM Ready. If your Meta base pixel tag in Google Tag Manager fires on All Pages or DOM Ready, the InitiateCheckout tag that fires on the begin_checkout custom event runs first, before fbq exists.

How to fix it. Make these two changes in Google Tag Manager:

  1. Change the Meta base pixel tag to fire on the Initialization – All Pages trigger, or configure it as a setup tag under Tag Sequencing on the InitiateCheckout tag.
  2. Map the InitiateCheckout parameters to the correct HomeRunner data layer paths: content_ids from ecommerce.items.0.item_id, content_name from ecommerce.items.0.item_name, currency from ecommerce.currency, and value from ecommerce.value.

If the InitiateCheckout tag fires twice per checkout view, check that it has only one trigger assigned.

The full event and parameter reference is at https://homerunner.io/docs/conversion-tracking-event-reference/