Javascript Creating Audit Record

Based on your comment here, it looks like you’ll need to have the skuid model defined wherever you want to have this audit insert, which is why I suggest a page include so you don’t have to redefine it over and over.  With the include you just setup your model once in a central page and then drop the include on whatever pages you want to audit. 

Another approach might be to dynamically build the model, which you can add to your script.  Skuid has a tutorial on this approach here - https://docs.skuid.com/latest/en/skuid/javascript/dynamic-model-component-creation.html

A third alternative if you want to keep it all in a central Javascript resource would be to use an AJAX call to insert the record directly to Salesforce and bypass the Skuid model dependency altogether.

Regardless of how you manage the audit component, you’ll need to add a component to any pages you want to track, be it a javascript resource, a page include or adding models directly to your page.  We have about 1000 pages, but we’re wrapping all these in a single page app and execute our auditing from the wrapper page so it minimizes what we need to configure on each page.