With the addition of JS logic to make Plausible work, it should be
defined alongside our other JS sources. Generally speaking, this is the
pattern we're taking with application and website JS. The reasons for
this are to remove the need for inline JS for security reasons, to push
dependencies into a place they can be tracked, to maintain all JS code
using linting/testing/etc tools, and to bundle everything up into a
single JS artifact.
A few key differences between the JS here and the JS in #155:
This JS works for more than just anchor elements. Using SUI, we'll want to
track on buttons, divs, etc, in addition to anchor elements
Use the Plausible library they publish on NPM instead of the include
script inline
With the addition of JS logic to make Plausible work, it should be defined alongside our other JS sources. Generally speaking, this is the pattern we're taking with application and website JS. The reasons for this are to remove the need for inline JS for security reasons, to push dependencies into a place they can be tracked, to maintain all JS code using linting/testing/etc tools, and to bundle everything up into a single JS artifact.
A few key differences between the JS here and the JS in #155:
:books: Documentation preview :books:: https://read-the-docs-site-community--156.com.readthedocs.build/en/156/