3f08e8a24916a75afd749c152097f58344819a3a max Thu Mar 2 07:11:02 2023 -0800 Ignore the previous commit in code review, that was all wrong, I was looking at the wrong analytics page and thought it was working. The GA4 system is entirely different and the code now spread out over five source files. Also: The part of cart.c that outputs the <HEAD> is getting worse and worse. To test the new code, set the analyticsKey to the value in the cgi-bin-max sandbox and go to https://analytics.google.com/analytics/web/#/p356133243/realtime. All staff should have access (if not email me or Lou or Hiram), refs #30725 diff --git src/inc/htmshell.h src/inc/htmshell.h index dd586db..a0705d6 100644 --- src/inc/htmshell.h +++ src/inc/htmshell.h @@ -116,30 +116,33 @@ void htmStartDirDepth(FILE *f, char *title, int dirDepth); /* Write the start of a stand alone .html file. dirDepth is the number of levels * beneath apache root that caller's HTML will appear to the web client. * E.g. if writing HTML from cgi-bin, dirDepth is 1; if trash/body/, 2. */ void htmlEnd(); /* Write the end of a cgi-generated html file */ void htmEnd(FILE *f); /* Write the end of a stand-alone html file */ extern char *htmlStyleUndecoratedLink; /* Style that gets rid of underline of links. */ +void htmlSetGa4Key(char *key); +/* Set google analytics 4 key, used when outputting HEAD */ + void htmlSetStyle(char *style); /* Set document wide style. A favorite style to * use for many purposes is htmlStyleUndecoratedLink * which will remove underlines from links. * Needs to be called before htmlStart or htmShell. */ void htmlSetStyleSheet(char *styleSheet); /* Set document wide style sheet by adding css name to HEAD part. * Needs to be called before htmlStart or htmShell. */ void htmlSetFormClass(char *formClass); /* Set class in the BODY part. */ void htmlSetStyleTheme(char *style);