Custom contents addon used for pixel tracking purposes in prestashop

With plugin html box pro I cannot configure pixel tracking scripts events in my site: AddToCart InitiateCheckout GenerateLead


Hello
html box pro is a multifunctional module to build own contents. This addon with its features can be used for pixel tracking purposes as well as for many other purposes. Implementation of "pixel events" just requires knowledge about how prestashop works (where the hooks are executed etc.)

Based on you questions about initiateCheckout, GenerateLead, AddToCart events i can suggest:

  • event: initiateCheckout - you can use displayShoppingCart event to run tracking of this event
  • event: GenerateLead - you can use any hook that appears on product page (like displayHeader)
  • event: AddToCart - you can use any hook that appears everywhere (like displayHeader)

Specification of how prestashop 'add to cart' process works - requires to add support of dynamic events
- addToCart is a dynamic event. Dynamic event is a kind of event that is spawned once you will do something in the shop. Simple page view is not equal to 'add product to cart' process. So, this event must be spawned when someone press the 'add to cart' button. So, to create support of such event you need to use script that will be spawned once someone will click "add to cart".

For exmaple, for prestashop 1.6.x:
<script>
$('document).ready(function(){
   $('#add_to_cart, .ajax_add_to_cart_button').click(function(){
       // add to cart event tracking code here
   });
});
</script>

Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment