From 36332e108e1cddafc8310c67de5cdf55b9508bcf Mon Sep 17 00:00:00 2001 From: rostislav Date: Sun, 12 May 2024 18:39:11 +0300 Subject: [PATCH 1/3] Documentation on the integration module for Magento 2 --- docs/magento2.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 docs/magento2.md diff --git a/docs/magento2.md b/docs/magento2.md new file mode 100644 index 00000000..37b3bedd --- /dev/null +++ b/docs/magento2.md @@ -0,0 +1,68 @@ +--- +title: Magento 2 +--- + +To integrate the partytown library functionality into your Magento 2 project, you can use the integration module for Magento2 : +Module for integrating BuilderIO/partytown library functionality into Magento 2 project + +## Requirements +/vendor/perspective/magento2-partytown +npm install ( node v16+ required ) +npm run partytown +```` + +## Configure + +In order for scripts to be loaded and executed in a separate thread of the webworker - you need to set the appropriate type ( text/partytown ) when connecting them. Using the example of GMT : + +```html + + + +``` + +Configuration of the module is managed through the admin panel, where you can select the list of available analytics services that will be allocated for execution in the webworker, as well as specify other configurations that affect the functionality of the library + +You can find the configurations at the following path : + +Stores -> Configuration -> Perspective -> Partytown + +## Optional: reverse-proxying scripts + +Given the peculiarities of the partytown library, you may encounter CORS errors when using certain scripts whose resources do not give the required headers. To avoid this, use reverse-proxying, the peculiarities and possible implementations are described here: +Proxying Requests + +You can also try using a self-hosted reverse-proxy solution +( see example here Node.js reverse-proxy example for partytown library ). + +## Troubleshooting +If you encounter errors when using the integration module for magento2 - you can also create an issue in the source repository \ No newline at end of file From 79a8c66a71b89f3264832f2bd4d02cd1e89d0e95 Mon Sep 17 00:00:00 2001 From: rostislav Date: Sun, 12 May 2024 18:42:17 +0300 Subject: [PATCH 2/3] magento2 docs, minor fixes --- docs/magento2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/magento2.md b/docs/magento2.md index 37b3bedd..d8e259a4 100644 --- a/docs/magento2.md +++ b/docs/magento2.md @@ -65,4 +65,4 @@ You can also try using a self-hosted reverse-proxy solution ( see example here Node.js reverse-proxy example for partytown library ). ## Troubleshooting -If you encounter errors when using the integration module for magento2 - you can also create an issue in the source repository \ No newline at end of file +If you encounter errors when using the integration module for Magento 2 - you can also create an issue in the source repository \ No newline at end of file From 6e64b48fe099610df9ae09f3c8f263c8558b9650 Mon Sep 17 00:00:00 2001 From: rostislav Date: Sun, 12 May 2024 23:26:47 +0300 Subject: [PATCH 3/3] added link to reverse-proxy example for warden --- docs/magento2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/magento2.md b/docs/magento2.md index d8e259a4..6535301b 100644 --- a/docs/magento2.md +++ b/docs/magento2.md @@ -62,7 +62,7 @@ Given the peculiarities of the partytown library, you may encounter CORS errors Proxying Requests You can also try using a self-hosted reverse-proxy solution -( see example here Node.js reverse-proxy example for partytown library ). +( see example here Node.js reverse-proxy example for partytown library and here Nginx reverse-proxy example for partytown library ( for warden ) ). ## Troubleshooting If you encounter errors when using the integration module for Magento 2 - you can also create an issue in the source repository \ No newline at end of file