@openeventkit/event-site 2.0.116 → 2.0.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/gatsby-browser.js +25 -18
  2. package/gatsby-config.mjs +5 -2
  3. package/package.json +5 -3
  4. package/plugins/gatsby-plugin-google-tagmanager/.babelrc +9 -0
  5. package/plugins/gatsby-plugin-google-tagmanager/CHANGELOG.md +793 -0
  6. package/plugins/gatsby-plugin-google-tagmanager/LICENSE +22 -0
  7. package/plugins/gatsby-plugin-google-tagmanager/README.md +102 -0
  8. package/plugins/gatsby-plugin-google-tagmanager/gatsby-browser.js +99 -0
  9. package/plugins/gatsby-plugin-google-tagmanager/gatsby-node.js +53 -0
  10. package/plugins/gatsby-plugin-google-tagmanager/gatsby-ssr.js +127 -0
  11. package/plugins/gatsby-plugin-google-tagmanager/index.js +1 -0
  12. package/plugins/gatsby-plugin-google-tagmanager/package.json +48 -0
  13. package/src/components/AttendeeToAttendeeWidgetComponent.js +7 -8
  14. package/src/components/LogoutButton.js +6 -7
  15. package/src/components/RegistrationLiteComponent.js +2 -4
  16. package/src/utils/EventEmitter.js +26 -0
  17. package/src/utils/cookies/CookieManager.js +27 -0
  18. package/src/utils/cookies/CookieManagerProvider.js +15 -0
  19. package/src/utils/cookies/providers/KlaroProvider.js +81 -0
  20. package/src/utils/cookies/services.js +57 -0
  21. package/src/utils/eventTriggers.js +19 -0
  22. package/src/utils/hooks/index.js +3 -1
  23. package/src/utils/hooks/useEventListener.js +15 -0
  24. package/src/utils/hooks/useResize.js +3 -8
  25. package/src/utils/tag-manager/TagManager.js +41 -0
  26. package/src/utils/tag-manager/TagManagerProvider.js +7 -0
  27. package/src/utils/tag-manager/providers/GoogleTagManagerProvider.js +49 -0
  28. package/src/utils/analytics/AnalyticsManager.js +0 -28
  29. package/src/utils/analytics/AnalyticsProvider.js +0 -7
  30. package/src/utils/analytics/events.js +0 -1
  31. package/src/utils/analytics/providers/GoogleTagManagerProvider.js +0 -38
  32. package/src/utils/customEvents/CustomEventManager.js +0 -22
  33. package/src/utils/customEvents/index.js +0 -15
  34. package/src/utils/customEvents/useCustomEvent.js +0 -13
package/gatsby-browser.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import * as Sentry from "@sentry/gatsby";
2
2
  import { RewriteFrames as RewriteFramesIntegration } from "@sentry/integrations";
3
3
  import ReduxWrapper from "./src/state/ReduxWrapper";
4
-
5
- import AnalyticsManager from "./src/utils/analytics/AnalyticsManager";
6
- import GoogleTagManagerProvider from "./src/utils/analytics/providers/GoogleTagManagerProvider";
7
-
4
+ import CookieManager from "./src/utils/cookies/CookieManager";
5
+ import KlaroProvider from "./src/utils/cookies/providers/KlaroProvider";
6
+ import cookieServices from "./src/utils/cookies/services";
7
+ import TagManager from "./src/utils/tag-manager/TagManager";
8
+ import GoogleTagManagerProvider from "./src/utils/tag-manager/providers/GoogleTagManagerProvider";
8
9
  import smoothscroll from "smoothscroll-polyfill";
9
10
  import "what-input";
10
11
 
@@ -18,17 +19,23 @@ import "./src/utils/fontAwesome";
18
19
  import colors from "data/colors.json";
19
20
  import marketingSettings from "data/marketing-settings.json";
20
21
 
21
- // smooth scroll polyfill needed for Safari
22
- smoothscroll.polyfill();
23
-
24
- const googleTagManagerProvider = new GoogleTagManagerProvider();
25
- const analyticsManager = new AnalyticsManager(googleTagManagerProvider);
26
-
27
22
  export const wrapRootElement = ReduxWrapper;
28
23
 
29
24
  export const onClientEntry = () => {
30
- // var set at document level
31
- // prevents widget color flashing from defaults to fetched by widget from marketing api
25
+ // smooth scroll polyfill needed for Safari
26
+ smoothscroll.polyfill();
27
+
28
+ // Initialize TagManager and add GoogleTagManagerProvider
29
+ const tagManager = new TagManager();
30
+ const googleTagManagerProvider = new GoogleTagManagerProvider();
31
+ tagManager.addProvider(googleTagManagerProvider);
32
+
33
+ // Initialize Cookie Manager with Klaro provider
34
+ const klaroProvider = new KlaroProvider();
35
+ const cookieManager = new CookieManager(klaroProvider, cookieServices);
36
+ cookieManager.show();
37
+
38
+ // Apply colors
32
39
  Object.entries(colors).forEach(([key, value]) => {
33
40
  document.documentElement.style.setProperty(`--${key}`, value);
34
41
  document.documentElement.style.setProperty(`--${key}50`, `${value}50`);
@@ -40,7 +47,7 @@ export const onClientEntry = () => {
40
47
 
41
48
  // init sentry
42
49
  const GATSBY_SENTRY_DSN = process.env.GATSBY_SENTRY_DSN;
43
- if(GATSBY_SENTRY_DSN) {
50
+ if (GATSBY_SENTRY_DSN) {
44
51
  console.log("INIT SENTRY ....");
45
52
  // sentry init
46
53
  Sentry.init({
@@ -61,12 +68,12 @@ export const onClientEntry = () => {
61
68
  return frame;
62
69
  }
63
70
  const isComponentFrame = /component---src-pages-(\w*)-js(-\w*).js/.test(frame.filename);
64
- if(isComponentFrame){
65
- frame.filename = frame.filename.replace(/(component---src-pages-(\w*)-js)(-\w*).js$/,'$1.js')
71
+ if (isComponentFrame) {
72
+ frame.filename = frame.filename.replace(/(component---src-pages-(\w*)-js)(-\w*).js$/, '$1.js');
66
73
  }
67
74
  const isAppFrame = /app(-\w*).js/.test(frame.filename);
68
- if(isAppFrame){
69
- frame.filename = frame.filename.replace(/app(-\w*).js$/,'app.js')
75
+ if (isAppFrame) {
76
+ frame.filename = frame.filename.replace(/app(-\w*).js$/, 'app.js');
70
77
  }
71
78
  return frame;
72
79
  }
@@ -76,4 +83,4 @@ export const onClientEntry = () => {
76
83
  });
77
84
  window.Sentry = Sentry;
78
85
  }
79
- };
86
+ };
package/gatsby-config.mjs CHANGED
@@ -53,10 +53,13 @@ const manifestPlugin = faviconAsset ? [
53
53
 
54
54
  const googleTagManagerPlugin = process.env.GATSBY_GOOGLE_TAGMANAGER_ID ? [
55
55
  {
56
- resolve: "gatsby-plugin-google-tagmanager",
56
+ resolve: require.resolve("./plugins/gatsby-plugin-google-tagmanager"),
57
57
  options: {
58
58
  id: process.env.GATSBY_GOOGLE_TAGMANAGER_ID,
59
- includeInDevelopment: true
59
+ includeInDevelopment: true,
60
+ // defer script tags loading to after consent is given
61
+ // managed by Klaro cookie manager
62
+ deferLoading: true
60
63
  }
61
64
  }
62
65
  ] : [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.116",
4
+ "version": "2.0.118",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
@@ -29,6 +29,7 @@
29
29
  "ably": "^1.2.34",
30
30
  "assert": "^2.1.0",
31
31
  "attendee-to-attendee-widget": "3.1.0",
32
+ "autoprefixer": "10.4.14",
32
33
  "awesome-bootstrap-checkbox": "^1.0.1",
33
34
  "axios": "^0.19.2",
34
35
  "babel-preset-gatsby": "^3.13.2",
@@ -53,7 +54,6 @@
53
54
  "gatsby": "^5.13.5",
54
55
  "gatsby-alias-imports": "^1.0.6",
55
56
  "gatsby-plugin-decap-cms": "^4.0.4",
56
- "gatsby-plugin-google-tagmanager": "^5.13.1",
57
57
  "gatsby-plugin-image": "^3.13.1",
58
58
  "gatsby-plugin-manifest": "^5.13.1",
59
59
  "gatsby-plugin-mdx": "^5.12.3",
@@ -74,6 +74,7 @@
74
74
  "immutability-helper": "2.9.1",
75
75
  "immutable": "^5.0.0-beta.5",
76
76
  "jsdom": "^24.1.0",
77
+ "klaro": "^0.7.21",
77
78
  "lite-schedule-widget": "3.0.3",
78
79
  "live-event-widget": "4.0.2",
79
80
  "lodash": "^4.17.19",
@@ -127,7 +128,7 @@
127
128
  "stream-browserify": "^3.0.0",
128
129
  "stream-chat": "^2.7.2",
129
130
  "stream-chat-react": "3.1.7",
130
- "summit-registration-lite": "5.0.35",
131
+ "summit-registration-lite": "5.0.36",
131
132
  "superagent": "8.0.9",
132
133
  "sweetalert2": "^9.17.0",
133
134
  "upcoming-events-widget": "3.0.5",
@@ -138,6 +139,7 @@
138
139
  "video.js": "^7.8.2",
139
140
  "videojs-mux": "^3.1.0",
140
141
  "videojs-youtube": "^2.6.1",
142
+ "web-vitals": "^1.1.2",
141
143
  "what-input": "^5.2.10",
142
144
  "xmlhttprequest": "^1.8.0",
143
145
  "yup": "^0.32.11"
@@ -0,0 +1,9 @@
1
+ {
2
+ "presets": [["babel-preset-gatsby-package"]],
3
+ "overrides": [
4
+ {
5
+ "test": ["**/gatsby-browser.js"],
6
+ "presets": [["babel-preset-gatsby-package", { "browser": true, "esm": true }]]
7
+ }
8
+ ]
9
+ }