j0Shi82 / shopify-partydawn

Example of Shopify's Dawn theme working with Partytown (Password: partydawn)
https://partydawn.myshopify.com/
Other
21 stars 7 forks source link

Need Some Additional Help #3

Open iprotecta opened 4 months ago

iprotecta commented 4 months ago

Hello Joshi, Thank you for this Repo.

Despite my lack of any real tech knowledge, following your Repo I have been able to successfully implement Partytown on our store (Non Dawn Theme). Google Analytics & Facebook Pixel work as per design, and see a moderate jump in the speed metrics. So really Thank you!

Based on the implementation had certain queries, will appreciate if you can help out:

1) If I am not mistaken Shopify now allows Service Workers from the CDN, is it still necessary to implement through the app proxy?

2) Is it possible somehow possible to use Partytown for scripts served by the theme from the assets folder? Scripts like Vendor.js or Utilities.js in the case of my theme, if yes, how would that implementation work? Asking on account of my limited tech knowledge.

3) There are other Scripts like Boomerang that Shopify is serving through Content For Header? Can these scripts be targeted as well? Is there any risk involved in targeting these scripts like Boomerang?

Once again thank you for this Repo, will really appreciate if you can help me out here!

j0Shi82 commented 3 months ago

Hey. Just wanted to chime in and say that I'll answer this in-depth as soon as possible. Just a quick sweep:

  1. There was an additional issue with loading the Partytown assets directly from assets. But will double check.
  2. It is possible. You will need to edit your Theme Liquid files though.
  3. Boomerang probably won't work inside Partytown because it's a RUM script. But generally, yes. It can be tricky and has limitations, so it's a case-by-case thing. Let me know what scripts you specifically would want to run through Partytown and I'll take a look.
iprotecta commented 3 months ago

Thank you. Will certainly look forward to your in-depth answer.

For 2. I tried tagging the scripts being loaded from the script as "text/partytown" - however that breaks the website. I understand that these files might need modifications, unfortunately that would be too much for my limited knowledge.

For 3. apart from Boomerang, there is another script being loaded "portable-wallet-en.js" - not sure what this script accomplishes.

Thank you once again, will look forward to your revert.