c772b661d511170e208547b98ecd815521ec1309 max Wed Jan 3 16:57:37 2024 -0800 adding ga4 special code to cartEmptyShell, refs #30725 diff --git src/hg/lib/cart.c src/hg/lib/cart.c index 342e9b8..08de27e 100644 --- src/hg/lib/cart.c +++ src/hg/lib/cart.c @@ -2760,31 +2760,34 @@ cartCheckout(&cart); cartFooter(); } static void cartEmptyShellMaybeContent(void (*doMiddle)(struct cart *cart), char *cookieName, char **exclude, struct hash *oldVars, boolean doContentType) /* Get cart and cookies and set up error handling. * If doContentType, print out Content-type:text/html * but don't start writing any html yet. * The doMiddleFunction has to call cartHtmlStart(title), and * cartHtmlEnd(), as well as writing the body of the HTML. * oldVars - those in cart that are overlayed by cgi-vars are * put in optional hash oldVars. */ { struct cart *cart = cartAndCookieWithHtml(cookieName, exclude, oldVars, doContentType); + setThemeFromCart(cart); +googleAnalyticsSetGa4Key(); + cartWarnCatcher(doMiddle, cart, cartEarlyWarningHandler); cartCheckout(&cart); } void cartEmptyShell(void (*doMiddle)(struct cart *cart), char *cookieName, char **exclude, struct hash *oldVars) /* Get cart and cookies and set up error handling, but don't start writing any * html yet. The doMiddleFunction has to call cartHtmlStart(title), and * cartHtmlEnd(), as well as writing the body of the HTML. * oldVars - those in cart that are overlayed by cgi-vars are * put in optional hash oldVars. */ { cartEmptyShellMaybeContent(doMiddle, cookieName, exclude, oldVars, TRUE); }