@churchapps/apphelper-login 0.4.50 → 0.5.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/AnalyticsHelper.ts"],"names":[],"mappings":"AAGA,qBAAa,eAAe;IAE1B,MAAM,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"AnalyticsHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/AnalyticsHelper.ts"],"names":[],"mappings":"AAGA,qBAAa,eAAe;IAE1B,MAAM,CAAC,IAAI,aASV;IAED,MAAM,CAAC,WAAW,aASjB;IAED,MAAM,CAAC,QAAQ,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,EAAE,QAAO,MAAM,UASjE;IAED,OAAO,CAAC,MAAM,CAAC,YAAY,CAG1B;CAEF"}
|
|
@@ -6,20 +6,35 @@ export class AnalyticsHelper {
|
|
|
6
6
|
_a = AnalyticsHelper;
|
|
7
7
|
AnalyticsHelper.init = () => {
|
|
8
8
|
if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof (window) !== "undefined") {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
try {
|
|
10
|
+
ReactGA.initialize([{ trackingId: CommonEnvironmentHelper.GoogleAnalyticsTag }]);
|
|
11
|
+
_a.logPageView();
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
console.warn('Analytics initialization failed:', error);
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
};
|
|
13
18
|
AnalyticsHelper.logPageView = () => {
|
|
14
19
|
if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof (window) !== "undefined") {
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
try {
|
|
21
|
+
_a.setChurchKey();
|
|
22
|
+
ReactGA.send({ hitType: "pageview", page: window.location.pathname + window.location.search });
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
console.warn('Analytics page view logging failed:', error);
|
|
26
|
+
}
|
|
17
27
|
}
|
|
18
28
|
};
|
|
19
29
|
AnalyticsHelper.logEvent = (category, action, label) => {
|
|
20
30
|
if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof (window) !== "undefined") {
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
try {
|
|
32
|
+
_a.setChurchKey();
|
|
33
|
+
ReactGA.event({ category, action, label });
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.warn('Analytics event logging failed:', error);
|
|
37
|
+
}
|
|
23
38
|
}
|
|
24
39
|
};
|
|
25
40
|
AnalyticsHelper.setChurchKey = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsHelper.js","sourceRoot":"","sources":["../../src/helpers/AnalyticsHelper.ts"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,OAAO,eAAe;;;AAEnB,oBAAI,GAAG,GAAG,EAAE;IACjB,IAAI,uBAAuB,CAAC,kBAAkB,KAAK,EAAE,IAAI,OAAM,CAAC,MAAM,CAAC,KAAG,WAAW,EAAE,CAAC;QACtF,OAAO,CAAC,UAAU,CAAC,CAAC,EAAC,UAAU,EAAE,uBAAuB,CAAC,kBAAkB,EAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"AnalyticsHelper.js","sourceRoot":"","sources":["../../src/helpers/AnalyticsHelper.ts"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,OAAO,eAAe;;;AAEnB,oBAAI,GAAG,GAAG,EAAE;IACjB,IAAI,uBAAuB,CAAC,kBAA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CAAC,IAAI,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;AACH,CAAC,AATc,CASd;AAEc,4BAAY,GAAG,GAAG,EAAE;IACjC,MAAM,SAAS,GAAG,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,SAAS,CAAC;IACnE,IAAI,SAAS;QAAE,OAAO,CAAC,GAAG,CAAC,EAAC,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;AACvD,CAAC,AAH0B,CAG1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@churchapps/apphelper-login",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Login components for ChurchApps AppHelper",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/LiveChurchSolutions/AppHelper#readme",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@churchapps/helpers": "^1.
|
|
31
|
-
"@churchapps/apphelper": "^0.
|
|
30
|
+
"@churchapps/helpers": "^1.2.3",
|
|
31
|
+
"@churchapps/apphelper": "^0.5.0",
|
|
32
32
|
"react": "^18.0.0 || ^19.0.0",
|
|
33
33
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
34
34
|
"react-router-dom": "^7.6.3"
|
|
@@ -5,22 +5,34 @@ export class AnalyticsHelper {
|
|
|
5
5
|
|
|
6
6
|
static init = () => {
|
|
7
7
|
if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof(window)!=="undefined") {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
try {
|
|
9
|
+
ReactGA.initialize([{trackingId: CommonEnvironmentHelper.GoogleAnalyticsTag}]);
|
|
10
|
+
AnalyticsHelper.logPageView();
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.warn('Analytics initialization failed:', error);
|
|
13
|
+
}
|
|
10
14
|
}
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
static logPageView = () => {
|
|
14
18
|
if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof(window)!=="undefined") {
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
try {
|
|
20
|
+
this.setChurchKey();
|
|
21
|
+
ReactGA.send({ hitType: "pageview", page: window.location.pathname + window.location.search });
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.warn('Analytics page view logging failed:', error);
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
static logEvent = (category: string, action: string, label?:string) => {
|
|
21
29
|
if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof(window)!=="undefined") {
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
try {
|
|
31
|
+
this.setChurchKey();
|
|
32
|
+
ReactGA.event({ category, action, label });
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.warn('Analytics event logging failed:', error);
|
|
35
|
+
}
|
|
24
36
|
}
|
|
25
37
|
}
|
|
26
38
|
|