I'am having an issue with the deployement of GTM on a prestashop (1.7) shop. I must send a dataLayer.push when an user login(true or false) and one when an user registers.
The problem is that I don't know where to trigger the dataLayer.push only if the user successfully completed the form with the good informations..
Hopefuly you guys can help me out since I'am pertty new to Prestashop
you should use Prestashop hooks
and build a simple module that execute your code when the hooks are fired.
You can use the following hooks to suit you needs :
actionCustomerAccountAdd and actionAuthentication