A bit of background:
I have a very simple Squarespace website, where I've created a manual form set up that takes in a user's email and a password for them to "login". They can only view the website once they're logged in. I didn't use Squarespace's features (like Member Areas) because they contain far too many undesirable features that are unable to be turned off (for example, I can't turn off automatic emails sent to users, I can't stop Squarespace from asking for first and last name, etc).
Now, I've been trying to figure out how to use Google Analytics' User ID feature (Universal Analytics, not GA 4 because GA 4 doesn't have great documentation yet and its features are still quite limited) in Squarespace so I can track the pages individual users view, but it's been giving me an insane amount of problems that aren't super well documented (from what I've seen at least). The biggest problem that I've been running into is that since my user ID is derived from the user's email (along with additional randomized numbers), I can get individual user info at the login page from the form submission, but I don't know how to keep this user info such that after the user is logged in and viewing various pages, I can still keep track of the user ID and enter it as a parameter in the GA configuration code for each page. I haven't seen evidence of a global variable system in Squarespace where I can store this user ID, so I'm pretty stumped (though I would be happy to know if someone knows of something similar).
Does anyone have any idea how I can individually track user activity on Squarespace without using Member Areas?
If you use the User-ID view you must send the user id in all hits, otherwise you will not see interactions in that view where that information is not present.
As an alternative (recommended) you can use a custom dimension at the user level, in that way you just need to send the userId even once, collect it in the custom dimension and from that moment on (including previous interactions of that same session) navigation of that user (also for subsequent sessions) will be associated with that identifier in Analytics.