0

Reading from another Magento stack overflow thread, everything seems pretty straightforward. Found here: How to add new facebook tracking pixel to magento site?

My question is for this one:

fbq('track', 'CompleteRegistration');

This can be done as part of your event or observer using customer_register_success event

Does this mean I can throw a <script>fbq('track', 'CompleteRegistration');</script> into that page or I actually have to integrate it into observer method?

1

You can add FaceBook Pixel directly into the phtml file OR can inject using observer.

If you're redirecting the customer to a unique registration success page instead of a common dashboard page then you can directly add pixel code into that unique template.

But if you're redirecting the customer to the default account dashboard page then you should go with the observer approach because if you add pixel code in dashboard page then you will get duplicate analytics data each time when customer logged in.

Hope it will help you.

  • Thank you very much. Can you show me how to add it into the observer method since I'm just redirecting to the default account dashboard. – Supplement May 31 '17 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.