I successfully made my function accessible by using the plugin attribute in the nuxt.config.js file, allowing me to call the function under mounted on every page. I am looking for a more efficient way to run this function within the head tag and have it be available on all pages without adding it individually to each one. I attempted to include it as a script under the head section in the nuxt.config.js file, but encountered issues as the script needed to contain a function.
Any suggestions or alternatives are appreciated!