To find which events have been fired - magento

How one can check the list of all the fired events in Magento during a http request?
Also, there so many of them how can we check if that event has already been declared before or not.Thanks

Mage::dispatchEvent() fires 2 profiler calls. So you can enable magento profiling and it will show you all dispatched events.
Also you can look at Developer Helper extension to get list of all defined in config.xml observers.

Related

Google Analytics: Event does not appear are being set up

Bear with me, because I'm relatively new to using GA and the people who set it up have either left or don't know how to use it. So there could be a deeper problem...
I'm trying to add an event via GTM, but it doesn't appear in my event list on GA. Everything, so far as I can tell, is set up correctly.
Do events not appear until they've been triggered? The product gets deployed to customers on a set-basis so there'll be a delay before the trigger is in the product
I chose the trigger as Click Classes and just added a class to the button. Is this enough to trigger the event?
Generally, you set up event tags in GTM that fires after a condition (like your Click Class) is triggered. Only after then, the event will get sent to Google Analytics and appear in your Events and Realtime reports.

How to write custom event log in monolog library?

I am using Laravel to build my web site.I installed monolog library to keep logging.
I want to log for click event.
how can I do this?
Please help.
Clicks happen on front-end side.
If you want to log every page load (PHP call) you can use App::before in app/filters.php to log every request. More information on that here.
If you want to log every click you might want to use Google Analytics' event tracking. Write some JS to handle all click events and send them to ga. More information here.

Trouble with Google Tag Manager (GTM) New Event Listener Tags

I'm very excited about GTM introducing the Event Listener tag options, and have used them with success on some websites. With several of my company's clients, however, I am having this strange issue.
I can see, using the debugger software that the Link Click Listener tag is firing, and I can see that the Record Event tag is firing. However the Events never show up in Analytics.
Any advice?
Thanks in advance!
Becky
Even with the Link Click Listener and the Event Listener firing, you still need to add an additional Google Analytics tag OR Universal Analytics tag to utilize them within GTM. Remember, the only thing the listeners do is create new dataLayers for you to use.
To make events work in Analytics, add a NEW Google Analytics (or UA) tag to GTM.
Select the Track type as 'Event'
Category: Whatever you'd like the category to be (you can use macros here as well)
Action: Whatever the action is, download, click, etc. (macros are helpful here too!)
Label: Whatever you'd like it to be.
The key here is how you setup the rules. Your {{event}} needs to utilize the dataLayer - gtm.click, then you need to specify an element you'd like to track.
For a fantastic tutorial, I recommend - http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-google-tag-manager/

Find out what Controller is triggering an event in symfony2

I need to trigger an event ONCE in my symfony2 project for each web
i have created an event that is dispatched whenever kernel.controller occurs, the problem is that this makes the event run six or seven times and I only want it to run once.
any ideas or suggestions?
if so,I wouldn't mind being able to know what controller triggered the event so I can put the code I want to put there!!

'Proceed to Checkout' Event for Magento?

I've just started putting together a Magento module which bypasses the whole Magento checkout process and instead sends the cart details to a 3rd party fulfilment company via XML-RPC.
Not getting anywhere fast and could use a bit of guidance. My understanding is that I should create the module with an observer based on the event triggered by proceeding to checkout. Trouble is I can't work out which event that would be, I've been through the whole massive list here;
http://www.nicksays.co.uk/magento_events_cheat_sheet/
I've tried;
checkout_submit_all_after - fires after order processed successfully
checkout_cart_add_product_complete - fires after product added to cart
checkout_cart_save_before - fires after product added to cart
checkout_type_onepage_save_order - can't get this to fire at all
checkout_onepage_controller_success_action - fires after order processed successfully
I don't know if this means I'll have to create a custom event or if there is an entirely different and much better alternative to what I'm doing. Building and sending the XML I will leave to another question (starting to realise I may have my hands pretty full here) but any tips there gratefully appreciated too.
Thanks for any help.
controller_action_predispatch_checkout_onepage_index should be the event you're looking for. All controllers inherit the preDispatch method which fires a generic event for predispatch, and a specific event based on the requested action path. The controller you want lives in the checkout module and is called onepage with a default action of index.
Review Mage_Core_Controller_Varien_Action::preDispatch() to see the relevant code

Resources