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

Problems with full page caching #44

Open pvalium opened 3 years ago

pvalium commented 3 years ago

Hi

I can see that if magento 2 full page cache is enabled, pixel event_id is caching too, and i can receive warning that "received same event identifier for multiple event instances', beacuse this page always sends same event_id.

image

How can I solve this problem?

etenclin commented 3 years ago

I think that is critical as information with personal data can be stored in cache and become visible to everyone who is inspecting the page code source.

xxu3-sc commented 3 years ago

Hi What personal data will be stored? Could you give me an example to help me understand?

etenclin commented 3 years ago

In the head block template (facebook-for-magento2/view/frontend/templates/pixel/head.phtml), the method getPixelInitCode() called on line 20 can return user data like email, first name, last name, zip code, city, phone, country.

xxu3-sc commented 3 years ago

So I assume if user A visited a magento web, then A's data is cached, in this case when user B view the same page, A's data is available to B? Do you have any suggestions to fix it?

On Thu, May 20, 2021 at 11:07 AM etenclin @.***> wrote:

In the head block template (facebook-for-magento2/view/frontend/templates/pixel/head.phtml), the method getPixelInitCode() called on line 20 can return user data like email, first name, last name, zip code, city, phone, country.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/facebook-for-magento2/issues/44#issuecomment-845349197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5P537LZWGIP7UYYXFYA7LTOVFVPANCNFSM44355V7A .

janssensjelle commented 3 years ago

We have the same issue. What about calling a controller with the data or use the private cache

qlhu commented 3 years ago

We have the same issue. When full page cache is enabled, the following events are only fired when the requested page is not visited. After that, the events are not fired until cache is flushed.

List reproduce steps of ViewCategory event incompatible with full page cache.

Preconditions:

Steps to reproduce:

  1. Visit the category page from Chrome browser
  2. Visit the same category page any browser other than Chrome

Expected result:

Actual result:

pixelhed commented 2 years ago

Did anyone ever solve this problem? I will be implementing a controller to do the work when FPC is enabled, if it's not already solved by someone else, then i'll make my code available

sanganinamrata commented 1 year ago

Hello @pixelhed I'm also struggling with the same issue. It would be great if you could share me the fixes of the same.

pixelhed commented 1 year ago

@sanganinamrata Sorry, but in the end i removed this extension from my installation