Trigger dataLayer.push when user successfully registered or logged

728 views Asked by At

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

1

There are 1 answers

2
gennaris On

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