facebook-for-woocommerce icon indicating copy to clipboard operation
facebook-for-woocommerce copied to clipboard

Feature request: page cache support

Open thomascharbit opened this issue 3 years ago • 3 comments

Hi,

As website performance becomes more and more important, especially in the e-commerce industry, the use of a page cache plugin such as WP Total Cache or WP Rocket is now pretty standard.

Unfortunately enabling a page cache plugin will cause some issues with Facebook For WooCommerce. The obvious issue being event ID duplication.

From my research it looks like it would not be too hard to support page caching thanks to cart fragments or simply by generating event IDs from JS itself.

Is this something the Facebook For WooCommerce team has considered to work on?

Thanks!

thomascharbit avatar Apr 30 '21 10:04 thomascharbit

Hi @thomascharbit,

Thank you for reaching out. There are a lot of different scenarios to consider. Could you provide some example scenarios of where you are observing issues and what is the nature of those issues?

budzanowski avatar Apr 30 '21 14:04 budzanowski

Hi,

On every injected event, some data cannot be cached:

  • event_id: because it should be unique for every page load
  • user specific fields (em, fn, ln, external_id, ct, zp, ph, cn, ...) because it will depends on the current visitor, wether he is logged in, etc.

So theses values should be generated or fetched from the browser directly, possibly using local storage to manage user-specific data.

thomascharbit avatar May 05 '21 09:05 thomascharbit

Came here to report the same, this is ruining our site performance. Alternative integrations have taken an AJAX approach and side load that data when required.

addedlovely avatar Feb 10 '22 14:02 addedlovely