facebookarchive / facebook-for-magento2

* Pixel on all pages, which trigger events link, PageView, ViewContent, AddToCart, Initiatecheckout and Purchase.* In the background, Syncs the products from the merchants product catalog to Facebook Catalog.* Stores all the data, like pixel id, catalog id, business maanger id, on to the local database on the instance.
Other
46 stars 36 forks source link

[Bug]: this method dont work on varnish cache (trackServerEvent on .phtml) #126

Open redati opened 1 year ago

redati commented 1 year ago

Contact Details

contato@redati.com.br

What happened?

This function used for send server events on pixel dont work for varnish or other eficent cache type.

https://github.com/facebookincubator/facebook-for-magento2/blob/0da8145b893f7fa7f43e4851bf75b6c304d97317/view/frontend/templates/pixel/view_content.phtml#L5

Magento Version

2.4.3

Plugin Version

1.4.5

Relevant log output

no need

Code of Conduct

dankocrama commented 1 year ago

Same problem here

VasilisX commented 1 year ago

It does not work with phtml and block class because this files are in cache and the eventId is always the same It is need to refactor the viewContent and viewCategory events to implement like the addtocart event that is, to be done with a controller