Ordering Website

Events

This documentation provides an overview of the events listener strategy and the different events you can listen to on the Hyperzod Ordering Website.

List of Events

Below is the list of events available for listening:

Event

Description

add_to_cart

Triggered when a product is added to the cart. The event contains the product details.

view_merchant

Triggered when a merchant is viewed. The event contains the merchant details.

view_product

Triggered when a product is viewed. The event contains the product details.

search_results

Triggered when a search is performed. The event contains the search query, search results for merchants, and products.

place_order

Triggered when an order is placed. The event contains the order details.

checkout_initiated

Triggered when checkout is initiated. The event contains the cart details.



Sample Code

To fire a GTM (Google Tag Manager) custom event from JavaScript on place_order event. Push an event object to the data layer with the event property set to the name of the custom event like NewOrder

JS




Usage

To set up more event listeners, you can use the following syntax:

JS


Replace <event_name> with the name of the event you want to listen to (e.g., view_merchant, view_product, etc.). You can add your custom logic or a handler function inside the listener as required.



Steps to Add Listener on your Ordering Website And App

1. Navigate to your admin panel



2. To the left, click on "Settings"

Document image




3. Then click "Theme settings"

Document image




4. Inside you’ll find three sections Theme General, Custom Code, Header and Footer. Click on "Custom Code

Document image




5. Inside the Custom HTML section, choose “Custom HTML Head” and paste the “Event Listener Code” inside.

Document image


6. Now if you want to add pixel code for tracking.

case-1 : If you want to track only webs spefic events.

JS


case-2 : If you want to track only app specific events.

JS


case-3 : If you want to track both app and web specific events.

JS




7. Lastly, click “Save”

Document image