Support » Plugin: Matomo Tracker » async/defer confusion

  • Resolved Simon Blackbourn


    I’ve chosen ‘defer’ as the loading mode for the external JS file, but the script tag in the head section that loads the piwik.php file has both the async and defer attributes set. As async takes precedence over defer if both are present, this means the defer attribute is being ignored.

    The script tag that calls the track.js file is at the end of the body, and it does have the defer attribute, but my understanding is that the defer and async attributes only apply to scripts in the head section, so this will have no effect.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author nir0ma


    Thanks for you feedback 🙂
    This can be issue with optimization plugin, async/defer options will be removed in next version as wprocket, w3 total cache and other optimization plugins will handle that.
    Have a nice day

    • This reply was modified 10 months ago by  nir0ma.

    Ok thanks – I use WP Rocket so that sounds good to me 🙂

    Plugin Author nir0ma


    @lumpysimon 1.2.2 released
    Please check if everything is OK 😉
    Have a nice day !

    Looks great thanks, working nicely in WP Rocket 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘async/defer confusion’ is closed to new replies.