• Resolved Gal Baras

    (@galbaras)


    Yo Daan,

    I use Autoptimize to combine and minify scripts, including inline code, but I want to keep the Analytics tracking in the HEAD. However, since I use Stealth Mode, the plugin inserts 2 inline script tags with no IDs or source files, and there’s no way to exclude them.

    Can you please add IDs to these SCRIPT tags, along with data-noptimize="true"?

    To be extra compliant, it’ll be good to add data-cfasync="false" data-wpfc-render="false" as well.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi Gal!

    Give this beta a try and let me know if that worked for you! It only contains the changes you suggested.

    Thread Starter Gal Baras

    (@galbaras)

    The Minimal Analytics inline script tags haven’t changed. You can confirm this by adding ?ao_noptimize=1 to the URL.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Oops. It was late and I wasn’t paying attention. This beta works.

    Thread Starter Gal Baras

    (@galbaras)

    MUCH better ??

    It remains to be decided whether or not this is a good thing for everyone, but I think it is for me, so if you decide to make it optional, I’ll be happy with a yes/no filter or with a filter on the script attributes, where developers can “roll their own”.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    The script is already minified, so there’s no need for optimization plugins to process it again. Excluding it automatically is a good way to guarantee compatibility. So, I’ll keep it this way.

    Thanks again, Gal!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.