@mparticle/web-google-analytics-4-client-kit 1.0.0
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.
- package/.eslintrc +30 -0
- package/README.md +28 -0
- package/dist/.keep +0 -0
- package/dist/GoogleAnalytics4EventForwarderClientSide-Kit.common.js +1315 -0
- package/dist/GoogleAnalytics4EventForwarderClientSide-Kit.iife.js +1318 -0
- package/package.json +46 -0
- package/rollup.config.js +52 -0
- package/src/commerce-handler.js +463 -0
- package/src/common.js +104 -0
- package/src/event-handler.js +36 -0
- package/src/identity-handler.js +68 -0
- package/src/initialization.js +75 -0
- package/src/session-handler.js +10 -0
- package/src/user-attribute-handler.js +27 -0
- package/test/boilerplate/karma.config.js +19 -0
- package/test/boilerplate/mockhttprequest.js +472 -0
- package/test/boilerplate/test-index.js +8 -0
- package/test/boilerplate/test-karma.js +8 -0
- package/test/end-to-end-testapp/build/.keep +0 -0
- package/test/end-to-end-testapp/settings.js +10 -0
- package/test/index.html +32 -0
- package/test/settings.json +12 -0
- package/test/tests.js +1433 -0
package/.eslintrc
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"env": {
|
|
4
|
+
"browser": true,
|
|
5
|
+
"node": true
|
|
6
|
+
},
|
|
7
|
+
"globals": {
|
|
8
|
+
"mParticle": true,
|
|
9
|
+
"gtag": true,
|
|
10
|
+
"describe": true,
|
|
11
|
+
"Should": true,
|
|
12
|
+
"MockHttpServer": true,
|
|
13
|
+
"it": true,
|
|
14
|
+
"sinon": true,
|
|
15
|
+
"const": true,
|
|
16
|
+
"before": true,
|
|
17
|
+
"beforeEach": true,
|
|
18
|
+
"after": true,
|
|
19
|
+
"Leanplum": true
|
|
20
|
+
},
|
|
21
|
+
"extends": ["plugin:prettier/recommended", "eslint:recommended"],
|
|
22
|
+
"plugins": ["prettier"],
|
|
23
|
+
"rules": {
|
|
24
|
+
"prettier/prettier": "error",
|
|
25
|
+
"no-prototype-builtins": "off",
|
|
26
|
+
"no-empty": "off",
|
|
27
|
+
"no-useless-escape": "off",
|
|
28
|
+
"no-unexpected-multiline": "off"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# mParticle Google Analytis 4 Client Side Kit Integration
|
|
2
|
+
|
|
3
|
+
# Usage
|
|
4
|
+
JS kits are automatically included with your mParticle.js file when loading mParticle via the [snippet](https://docs.mparticle.com/developers/sdk/web/getting-started/#add-the-sdk-snippet).
|
|
5
|
+
|
|
6
|
+
If loading mParticle via [npm](https://docs.mparticle.com/developers/sdk/web/self-hosting/), you will have to manually include the client side GA4 kit via npm:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
npm i @mparticle/web-google-analytics-4-client-kit
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Full documentation on usage can be found [here](https://docs.mparticle.com/integrations/google-analytics-4/event/).
|
|
13
|
+
|
|
14
|
+
#License
|
|
15
|
+
|
|
16
|
+
Copyright 2022 mParticle, Inc.
|
|
17
|
+
|
|
18
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
you may not use this file except in compliance with the License.
|
|
20
|
+
You may obtain a copy of the License at
|
|
21
|
+
|
|
22
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
|
|
24
|
+
Unless required by applicable law or agreed to in writing, software
|
|
25
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
26
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
|
+
See the License for the specific language governing permissions and
|
|
28
|
+
limitations under the License.
|
package/dist/.keep
ADDED
|
File without changes
|