Documentation
Magento Extension Documentation ( Events Capturing)
Lead Capturing
Event
The purpose of this event capturing is to send every new signup to Datanuum. Magento signup is considered as a new lead to the system.
The Datannum Magento extension observes all the signup by listening the events:
- customer_register_success
- customer_save_after
The customer_register_success event is defined in the below plugin paths:-
“Datanuum/Loyalty/etc/webapi_rest/events.xml” - customer_save_after
(This is for registrations or updates which are performed via the REST API)
“Datanuum/Loyalty/etc/frontend/events.xml” - customer_register_success
Observer
Datanuum\Loyalty\Observer\Pixel\Lead: - This observer is executed after a customer is saved. It is used to track customer information for marketing purposes. This observer is triggered by the customer_save_after even and customer_register_success
If you want to add new event listener to the plugin, add the below xml lines to the events.xml present in the location
Datanuum/Loyalty/etc/frontend/or Datanuum/Loyalty/etc/webapi_rest/
Sample XML
<event name="[your-event]">
<observer name="[your-event-observer-name]" instance="Datanuum\Loyalty\Observer\Pixel\Lead" />
</event>
Add to Cart Capturing
Event
Add to cart events in magento is captured by the extension by listening the event
- checkout_cart_add_product_complete
The Checkout_cart_add_product_complete event is defined in the below plugin path:-
“Datanuum/Loyalty/etc/frontend/events.xml”
Observer
Datanuum\Loyalty\Observer\Pixel\AddToCart: This observer is executed after a product is added to the cart. It is used to track add to cart events for marketing purposes. This observer is triggered by the checkout_cart_add_product_complete
Purchase Events Capturing
Event
Purchase events in magento is captured by the extension by listening the event
- checkout_submit_all_after
- paypal_express_place_order_success
The Checkout_cart_add_product_complete event is defined in the below plugin path:-
“Datanuum/Loyalty/etc/events.xml”
“Datanuum/Loyalty/etc/webapi_rest/events.xml”
Observer
Datanuum\Loyalty\Observer\LoyaltyCheckoutSubmitAllAfter: This observer is executed after the checkout process is submitted. It is used to add loyalty points to the customer's account when an order is placed. This observer is triggered by the checkout_submit_all_after and paypal_express_place_order_success events.
Page view Events Capturing
Event
Page view events in magento is captured by the extension by listening the event
- layout_load_before
The layout_load_before event is defined in the below plugin path:-
“Datanuum/Loyalty/etc/frontend/events.xml”
Observer
Datanuum\Loyalty\Observer\Pixel\PageView: This observer is executed before the page is sent to the browser. It is used to track customer's activity on the website. This observer is triggered by thelayout_load_before event.