Hi @djwilko12, PixelYourSite does not have a built-in option to delay its own script loading for performance purposes. To achieve this you will need a caching/optimization plugin that includes a “Delay JavaScript Execution” feature.
Hi,
Thank you for your reply.
Could you please provide a list of the specific PixelYourSite scripts, script handles, or JavaScript files that should be delayed using an optimization plugin?
We want to make sure we optimize performance without breaking or reducing the reliability of the tracking setup.
Thank you.
-
This reply was modified 3 months, 4 weeks ago by
djwilko12.
Sure, here are the PixelYourSite scripts and files you can safely add to your optimization plugin’s delay list:
pys-js-extra
pysOptions
wp-content/plugins/pixelyoursite/dist/scripts/public.js
wp-content/plugins/pixelyoursite/dist/scripts/js.cookie-2.1.3.min.js
wp-content/plugins/pixelyoursite/dist/scripts/sha256.js
wp-content/plugins/pixelyoursite/dist/scripts/tld.min.js
We recommend using “Delay until user interaction” (scroll, click, or touch) rather than a fixed time delay — this fully frees up the main thread during initial page load and will have the biggest positive impact on your PageSpeed and Core Web Vitals scores.