mirror repo (WIP)

Need to remove secrets before entire repo can be made public.
This commit is contained in:
Brandon Thomas
2025-09-18 22:55:03 -04:00
commit 0daf83dba9
8735 changed files with 2963896 additions and 0 deletions
@@ -0,0 +1,4 @@
export * from './lib/gtag-login.js';
export * from './lib/gtag-logout.js';
export * from './lib/gtag-event.js';
@@ -0,0 +1,10 @@
// Send an event with name and "args". Args is a string-to-string map.
export const gtagEvent = function(eventName: string, args?: { [key: string]: string }) {
console.debug("gtagEvent", eventName, args);
if (!args) {
(window as any).gtag('event', eventName);
} else {
(window as any).gtag('event', eventName, args);
}
}
@@ -0,0 +1,10 @@
import { TAG_ID } from './tag-id.js';
export const gtagLogin = function(userToken: string) {
console.debug("gtagLogin", TAG_ID, userToken);
(window as any).gtag(
'config', TAG_ID, {
'user_id': userToken
});
}
@@ -0,0 +1,10 @@
import { TAG_ID } from './tag-id.js';
export const gtagLogout = function() {
console.debug("gtagLogout", TAG_ID);
(window as any).gtag(
'config', TAG_ID, {
'user_id': null
});
}
@@ -0,0 +1 @@
export const TAG_ID = 'G-Y4Y8KMLPQ7';