@graphcommerce/googleanalytics 9.0.0-canary.59 → 9.0.0-canary.61
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/CHANGELOG.md +8 -0
- package/package.json +12 -12
- package/plugins/gtagEvent.ts +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.0.0-canary.61
|
|
4
|
+
|
|
5
|
+
## 9.0.0-canary.60
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2331](https://github.com/graphcommerce-org/graphcommerce/pull/2331) [`702bfc9`](https://github.com/graphcommerce-org/graphcommerce/commit/702bfc93566c9745546988e57988431d5d4d8cb0) - Moved plugins to new format ([@paales](https://github.com/paales))
|
|
10
|
+
|
|
3
11
|
## 9.0.0-canary.59
|
|
4
12
|
|
|
5
13
|
## 9.0.0-canary.58
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/googleanalytics",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.61",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@graphcommerce/google-datalayer": "9.0.0-canary.
|
|
15
|
+
"@graphcommerce/google-datalayer": "9.0.0-canary.61"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.
|
|
19
|
-
"@graphcommerce/graphql-mesh": "^9.0.0-canary.
|
|
20
|
-
"@graphcommerce/magento-cart": "^9.0.0-canary.
|
|
21
|
-
"@graphcommerce/magento-cart-payment-method": "^9.0.0-canary.
|
|
22
|
-
"@graphcommerce/magento-cart-shipping-method": "^9.0.0-canary.
|
|
23
|
-
"@graphcommerce/magento-product": "^9.0.0-canary.
|
|
24
|
-
"@graphcommerce/next-config": "^9.0.0-canary.
|
|
25
|
-
"@graphcommerce/next-ui": "^9.0.0-canary.
|
|
26
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.
|
|
27
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.
|
|
18
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.61",
|
|
19
|
+
"@graphcommerce/graphql-mesh": "^9.0.0-canary.61",
|
|
20
|
+
"@graphcommerce/magento-cart": "^9.0.0-canary.61",
|
|
21
|
+
"@graphcommerce/magento-cart-payment-method": "^9.0.0-canary.61",
|
|
22
|
+
"@graphcommerce/magento-cart-shipping-method": "^9.0.0-canary.61",
|
|
23
|
+
"@graphcommerce/magento-product": "^9.0.0-canary.61",
|
|
24
|
+
"@graphcommerce/next-config": "^9.0.0-canary.61",
|
|
25
|
+
"@graphcommerce/next-ui": "^9.0.0-canary.61",
|
|
26
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.61",
|
|
27
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.61",
|
|
28
28
|
"@mui/material": "^5.10.16",
|
|
29
29
|
"next": "*",
|
|
30
30
|
"react": "^18.2.0",
|
package/plugins/gtagEvent.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { sendEvent } from '@graphcommerce/google-datalayer/api/sendEvent'
|
|
2
|
-
import type {
|
|
1
|
+
import { sendEvent as sendEventType } from '@graphcommerce/google-datalayer/api/sendEvent'
|
|
2
|
+
import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const config: PluginConfig = {
|
|
5
|
+
type: 'function',
|
|
6
|
+
module: '@graphcommerce/google-datalayer',
|
|
7
|
+
ifConfig: 'googleAnalyticsId',
|
|
8
|
+
}
|
|
7
9
|
|
|
8
|
-
const
|
|
10
|
+
export const sendEvent: FunctionPlugin<typeof sendEventType> = (prev, eventName, eventData) => {
|
|
9
11
|
prev(eventName, eventData)
|
|
10
12
|
globalThis.gtag('event', eventName, eventData)
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
export const plugin = gtagEvent
|