@walkeros/web-destination-matomo 3.4.0-next-1776749829492

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.
@@ -0,0 +1,310 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/examples/index.ts
21
+ var examples_exports = {};
22
+ __export(examples_exports, {
23
+ env: () => env_exports,
24
+ step: () => step_exports
25
+ });
26
+ module.exports = __toCommonJS(examples_exports);
27
+
28
+ // src/examples/env.ts
29
+ var env_exports = {};
30
+ __export(env_exports, {
31
+ init: () => init,
32
+ push: () => push,
33
+ simulation: () => simulation
34
+ });
35
+ var init = {
36
+ window: {
37
+ _paq: void 0,
38
+ location: { href: "https://www.example.com/page" }
39
+ },
40
+ document: {
41
+ createElement: () => ({
42
+ type: "",
43
+ src: "",
44
+ async: false,
45
+ defer: false
46
+ }),
47
+ head: { appendChild: () => {
48
+ } }
49
+ }
50
+ };
51
+ var push = {
52
+ window: {
53
+ _paq: [],
54
+ location: { href: "https://www.example.com/page" }
55
+ },
56
+ document: {
57
+ createElement: () => ({
58
+ type: "",
59
+ src: "",
60
+ async: false,
61
+ defer: false
62
+ }),
63
+ head: { appendChild: () => {
64
+ } }
65
+ }
66
+ };
67
+ var simulation = [
68
+ "call:window._paq.push"
69
+ // Track _paq.push calls
70
+ ];
71
+
72
+ // src/examples/step.ts
73
+ var step_exports = {};
74
+ __export(step_exports, {
75
+ customEvent: () => customEvent,
76
+ ecommerceCartUpdate: () => ecommerceCartUpdate,
77
+ ecommerceOrder: () => ecommerceOrder,
78
+ goalTracking: () => goalTracking,
79
+ init: () => init2,
80
+ pageView: () => pageView,
81
+ productDetailView: () => productDetailView,
82
+ siteSearch: () => siteSearch
83
+ });
84
+ var import_core = require("@walkeros/core");
85
+ var init2 = {
86
+ in: {
87
+ loadScript: true,
88
+ settings: {
89
+ siteId: "1",
90
+ url: "https://analytics.example.com/"
91
+ }
92
+ },
93
+ out: [
94
+ [
95
+ "_paq.push",
96
+ ["setTrackerUrl", "https://analytics.example.com/matomo.php"]
97
+ ],
98
+ ["_paq.push", ["setSiteId", "1"]],
99
+ ["_paq.push", ["enableLinkTracking"]]
100
+ ]
101
+ };
102
+ var pageView = {
103
+ in: (0, import_core.getEvent)("page view", { timestamp: 1700000400 }),
104
+ mapping: {
105
+ data: "data.title"
106
+ },
107
+ out: [["_paq.push", ["trackPageView", "walkerOS documentation"]]]
108
+ };
109
+ var customEvent = {
110
+ in: (0, import_core.getEvent)("promotion visible", { timestamp: 1700000401 }),
111
+ mapping: {
112
+ name: "trackEvent",
113
+ settings: {
114
+ goalId: "goal_1"
115
+ },
116
+ data: {
117
+ set: ["data.name", "data.position"]
118
+ }
119
+ },
120
+ out: [
121
+ ["_paq.push", ["trackEvent", "Setting up tracking easily", "hero"]],
122
+ ["_paq.push", ["trackGoal", "goal_1", void 0]]
123
+ ]
124
+ };
125
+ var ecommerceOrder = {
126
+ in: (0, import_core.getEvent)("order complete", { timestamp: 1700000402 }),
127
+ mapping: {
128
+ name: "trackEcommerceOrder",
129
+ data: {
130
+ set: [
131
+ {
132
+ loop: [
133
+ "nested",
134
+ {
135
+ condition: (entity) => (0, import_core.isObject)(entity) && entity.entity === "product",
136
+ map: {
137
+ sku: "data.id",
138
+ name: "data.name",
139
+ category: { value: "" },
140
+ price: "data.price",
141
+ quantity: { value: 1 }
142
+ }
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ map: {
148
+ orderId: "data.id",
149
+ grandTotal: "data.total",
150
+ tax: "data.taxes",
151
+ shipping: "data.shipping"
152
+ }
153
+ }
154
+ ]
155
+ }
156
+ },
157
+ out: [
158
+ [
159
+ "_paq.push",
160
+ [
161
+ "trackEcommerceOrder",
162
+ [
163
+ {
164
+ sku: "ers",
165
+ name: "Everyday Ruck Snack",
166
+ category: "",
167
+ price: 420,
168
+ quantity: 1
169
+ },
170
+ {
171
+ sku: "cc",
172
+ name: "Cool Cap",
173
+ category: "",
174
+ price: 42,
175
+ quantity: 1
176
+ }
177
+ ],
178
+ {
179
+ orderId: "0rd3r1d",
180
+ grandTotal: 555,
181
+ tax: 73.76,
182
+ shipping: 5.22
183
+ }
184
+ ]
185
+ ]
186
+ ]
187
+ };
188
+ var ecommerceCartUpdate = {
189
+ in: (0, import_core.getEvent)("cart view", { timestamp: 1700000403 }),
190
+ mapping: {
191
+ name: "trackEcommerceCartUpdate",
192
+ data: {
193
+ set: [
194
+ {
195
+ loop: [
196
+ "nested",
197
+ {
198
+ condition: (entity) => (0, import_core.isObject)(entity) && entity.entity === "product",
199
+ map: {
200
+ sku: "data.id",
201
+ name: "data.name",
202
+ category: { value: "" },
203
+ price: "data.price",
204
+ quantity: { value: 1 }
205
+ }
206
+ }
207
+ ]
208
+ },
209
+ "data.value"
210
+ ]
211
+ }
212
+ },
213
+ out: [
214
+ [
215
+ "_paq.push",
216
+ [
217
+ "trackEcommerceCartUpdate",
218
+ [
219
+ {
220
+ sku: "ers",
221
+ name: "Everyday Ruck Snack",
222
+ category: "",
223
+ price: 420,
224
+ quantity: 1
225
+ }
226
+ ],
227
+ 840
228
+ ]
229
+ ]
230
+ ]
231
+ };
232
+ var productDetailView = {
233
+ in: (0, import_core.getEvent)("product view", { timestamp: 1700000404 }),
234
+ mapping: {
235
+ name: "ecommerceProductDetailView",
236
+ data: {
237
+ set: [
238
+ {
239
+ set: [
240
+ {
241
+ map: {
242
+ sku: "data.id",
243
+ name: "data.name",
244
+ price: "data.price",
245
+ quantity: { value: 1 }
246
+ }
247
+ }
248
+ ]
249
+ }
250
+ ]
251
+ }
252
+ },
253
+ out: [
254
+ [
255
+ "_paq.push",
256
+ [
257
+ "ecommerceProductDetailView",
258
+ [
259
+ {
260
+ sku: "ers",
261
+ name: "Everyday Ruck Snack",
262
+ price: 420,
263
+ quantity: 1
264
+ }
265
+ ]
266
+ ]
267
+ ]
268
+ ]
269
+ };
270
+ var siteSearch = {
271
+ in: (0, import_core.getEvent)("search submit", {
272
+ timestamp: 1700000405,
273
+ data: { query: "shoes", category: "products", resultsCount: 42 }
274
+ }),
275
+ mapping: {
276
+ name: "trackSiteSearch",
277
+ settings: {
278
+ siteSearch: true
279
+ },
280
+ data: {
281
+ set: ["data.query", "data.category", "data.resultsCount"]
282
+ }
283
+ },
284
+ out: [["_paq.push", ["trackSiteSearch", "shoes", "products", 42]]]
285
+ };
286
+ var goalTracking = {
287
+ in: (0, import_core.getEvent)("promotion visible", {
288
+ timestamp: 1700000406,
289
+ data: { name: "Setting up tracking easily", position: "hero", value: 50 }
290
+ }),
291
+ mapping: {
292
+ name: "trackEvent",
293
+ settings: {
294
+ goalId: "1",
295
+ goalValue: "data.value"
296
+ },
297
+ data: {
298
+ set: ["data.name"]
299
+ }
300
+ },
301
+ out: [
302
+ ["_paq.push", ["trackEvent", "Setting up tracking easily"]],
303
+ ["_paq.push", ["trackGoal", "1", 50]]
304
+ ]
305
+ };
306
+ // Annotate the CommonJS export names for ESM import in node:
307
+ 0 && (module.exports = {
308
+ env,
309
+ step
310
+ });
@@ -0,0 +1,288 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // src/examples/env.ts
8
+ var env_exports = {};
9
+ __export(env_exports, {
10
+ init: () => init,
11
+ push: () => push,
12
+ simulation: () => simulation
13
+ });
14
+ var init = {
15
+ window: {
16
+ _paq: void 0,
17
+ location: { href: "https://www.example.com/page" }
18
+ },
19
+ document: {
20
+ createElement: () => ({
21
+ type: "",
22
+ src: "",
23
+ async: false,
24
+ defer: false
25
+ }),
26
+ head: { appendChild: () => {
27
+ } }
28
+ }
29
+ };
30
+ var push = {
31
+ window: {
32
+ _paq: [],
33
+ location: { href: "https://www.example.com/page" }
34
+ },
35
+ document: {
36
+ createElement: () => ({
37
+ type: "",
38
+ src: "",
39
+ async: false,
40
+ defer: false
41
+ }),
42
+ head: { appendChild: () => {
43
+ } }
44
+ }
45
+ };
46
+ var simulation = [
47
+ "call:window._paq.push"
48
+ // Track _paq.push calls
49
+ ];
50
+
51
+ // src/examples/step.ts
52
+ var step_exports = {};
53
+ __export(step_exports, {
54
+ customEvent: () => customEvent,
55
+ ecommerceCartUpdate: () => ecommerceCartUpdate,
56
+ ecommerceOrder: () => ecommerceOrder,
57
+ goalTracking: () => goalTracking,
58
+ init: () => init2,
59
+ pageView: () => pageView,
60
+ productDetailView: () => productDetailView,
61
+ siteSearch: () => siteSearch
62
+ });
63
+ import { getEvent, isObject } from "@walkeros/core";
64
+ var init2 = {
65
+ in: {
66
+ loadScript: true,
67
+ settings: {
68
+ siteId: "1",
69
+ url: "https://analytics.example.com/"
70
+ }
71
+ },
72
+ out: [
73
+ [
74
+ "_paq.push",
75
+ ["setTrackerUrl", "https://analytics.example.com/matomo.php"]
76
+ ],
77
+ ["_paq.push", ["setSiteId", "1"]],
78
+ ["_paq.push", ["enableLinkTracking"]]
79
+ ]
80
+ };
81
+ var pageView = {
82
+ in: getEvent("page view", { timestamp: 1700000400 }),
83
+ mapping: {
84
+ data: "data.title"
85
+ },
86
+ out: [["_paq.push", ["trackPageView", "walkerOS documentation"]]]
87
+ };
88
+ var customEvent = {
89
+ in: getEvent("promotion visible", { timestamp: 1700000401 }),
90
+ mapping: {
91
+ name: "trackEvent",
92
+ settings: {
93
+ goalId: "goal_1"
94
+ },
95
+ data: {
96
+ set: ["data.name", "data.position"]
97
+ }
98
+ },
99
+ out: [
100
+ ["_paq.push", ["trackEvent", "Setting up tracking easily", "hero"]],
101
+ ["_paq.push", ["trackGoal", "goal_1", void 0]]
102
+ ]
103
+ };
104
+ var ecommerceOrder = {
105
+ in: getEvent("order complete", { timestamp: 1700000402 }),
106
+ mapping: {
107
+ name: "trackEcommerceOrder",
108
+ data: {
109
+ set: [
110
+ {
111
+ loop: [
112
+ "nested",
113
+ {
114
+ condition: (entity) => isObject(entity) && entity.entity === "product",
115
+ map: {
116
+ sku: "data.id",
117
+ name: "data.name",
118
+ category: { value: "" },
119
+ price: "data.price",
120
+ quantity: { value: 1 }
121
+ }
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ map: {
127
+ orderId: "data.id",
128
+ grandTotal: "data.total",
129
+ tax: "data.taxes",
130
+ shipping: "data.shipping"
131
+ }
132
+ }
133
+ ]
134
+ }
135
+ },
136
+ out: [
137
+ [
138
+ "_paq.push",
139
+ [
140
+ "trackEcommerceOrder",
141
+ [
142
+ {
143
+ sku: "ers",
144
+ name: "Everyday Ruck Snack",
145
+ category: "",
146
+ price: 420,
147
+ quantity: 1
148
+ },
149
+ {
150
+ sku: "cc",
151
+ name: "Cool Cap",
152
+ category: "",
153
+ price: 42,
154
+ quantity: 1
155
+ }
156
+ ],
157
+ {
158
+ orderId: "0rd3r1d",
159
+ grandTotal: 555,
160
+ tax: 73.76,
161
+ shipping: 5.22
162
+ }
163
+ ]
164
+ ]
165
+ ]
166
+ };
167
+ var ecommerceCartUpdate = {
168
+ in: getEvent("cart view", { timestamp: 1700000403 }),
169
+ mapping: {
170
+ name: "trackEcommerceCartUpdate",
171
+ data: {
172
+ set: [
173
+ {
174
+ loop: [
175
+ "nested",
176
+ {
177
+ condition: (entity) => isObject(entity) && entity.entity === "product",
178
+ map: {
179
+ sku: "data.id",
180
+ name: "data.name",
181
+ category: { value: "" },
182
+ price: "data.price",
183
+ quantity: { value: 1 }
184
+ }
185
+ }
186
+ ]
187
+ },
188
+ "data.value"
189
+ ]
190
+ }
191
+ },
192
+ out: [
193
+ [
194
+ "_paq.push",
195
+ [
196
+ "trackEcommerceCartUpdate",
197
+ [
198
+ {
199
+ sku: "ers",
200
+ name: "Everyday Ruck Snack",
201
+ category: "",
202
+ price: 420,
203
+ quantity: 1
204
+ }
205
+ ],
206
+ 840
207
+ ]
208
+ ]
209
+ ]
210
+ };
211
+ var productDetailView = {
212
+ in: getEvent("product view", { timestamp: 1700000404 }),
213
+ mapping: {
214
+ name: "ecommerceProductDetailView",
215
+ data: {
216
+ set: [
217
+ {
218
+ set: [
219
+ {
220
+ map: {
221
+ sku: "data.id",
222
+ name: "data.name",
223
+ price: "data.price",
224
+ quantity: { value: 1 }
225
+ }
226
+ }
227
+ ]
228
+ }
229
+ ]
230
+ }
231
+ },
232
+ out: [
233
+ [
234
+ "_paq.push",
235
+ [
236
+ "ecommerceProductDetailView",
237
+ [
238
+ {
239
+ sku: "ers",
240
+ name: "Everyday Ruck Snack",
241
+ price: 420,
242
+ quantity: 1
243
+ }
244
+ ]
245
+ ]
246
+ ]
247
+ ]
248
+ };
249
+ var siteSearch = {
250
+ in: getEvent("search submit", {
251
+ timestamp: 1700000405,
252
+ data: { query: "shoes", category: "products", resultsCount: 42 }
253
+ }),
254
+ mapping: {
255
+ name: "trackSiteSearch",
256
+ settings: {
257
+ siteSearch: true
258
+ },
259
+ data: {
260
+ set: ["data.query", "data.category", "data.resultsCount"]
261
+ }
262
+ },
263
+ out: [["_paq.push", ["trackSiteSearch", "shoes", "products", 42]]]
264
+ };
265
+ var goalTracking = {
266
+ in: getEvent("promotion visible", {
267
+ timestamp: 1700000406,
268
+ data: { name: "Setting up tracking easily", position: "hero", value: 50 }
269
+ }),
270
+ mapping: {
271
+ name: "trackEvent",
272
+ settings: {
273
+ goalId: "1",
274
+ goalValue: "data.value"
275
+ },
276
+ data: {
277
+ set: ["data.name"]
278
+ }
279
+ },
280
+ out: [
281
+ ["_paq.push", ["trackEvent", "Setting up tracking easily"]],
282
+ ["_paq.push", ["trackGoal", "1", 50]]
283
+ ]
284
+ };
285
+ export {
286
+ env_exports as env,
287
+ step_exports as step
288
+ };
@@ -0,0 +1 @@
1
+ "use strict";var Destination=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i={};((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})(i,{DestinationMatomo:()=>g,default:()=>h,destinationMatomo:()=>O});var r=Object.defineProperty;((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})({},{Level:()=>s});var a,s=((a=s||{})[a.ERROR=0]="ERROR",a[a.WARN=1]="WARN",a[a.INFO=2]="INFO",a[a.DEBUG=3]="DEBUG",a);function c(e){return Array.isArray(e)}function u(e){return void 0!==e}function l(e){return"object"==typeof e&&null!==e&&!c(e)&&"[object Object]"===Object.prototype.toString.call(e)}function f(e){return"string"==typeof e}function d(e,t="",n){const o=t.split(".");let i=e;for(let e=0;e<o.length;e++){const t=o[e];if("*"===t&&c(i)){const t=o.slice(e+1).join("."),r=[];for(const e of i){const o=d(e,t,n);r.push(o)}return r}if(i=i instanceof Object?i[t]:void 0,void 0===i)break}return u(i)?i:n}function m(e){return function(e){return"boolean"==typeof e}(e)||f(e)||function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)||!u(e)||c(e)&&e.every(m)||l(e)&&Object.values(e).every(m)}function p(e){return m(e)?e:void 0}function b(e,t,n){return async function(...o){try{return await e(...o)}catch(e){if(!t)return;return await t(e)}finally{await(null==n?void 0:n())}}}async function v(e,t={},n={}){var o;if(!u(e))return;const i=l(e)&&e.consent||n.consent||(null==(o=n.collector)?void 0:o.consent),r=c(t)?t:[t];for(const t of r){const o=await b(w)(e,t,{...n,consent:i});if(u(o))return o}}async function w(e,t,n={}){const{collector:o,consent:i}=n;return(c(t)?t:[t]).reduce(async(t,r)=>{const a=await t;if(a)return a;const s=f(r)?{key:r}:r;if(!Object.keys(s).length)return;const{condition:l,consent:m,fn:y,key:g,loop:O,map:j,set:h,validate:k,value:D}=s;if(l&&!await b(l)(e,r,o))return;if(m&&!function(e,t={},n={}){const o={...t,...n},i={};let r=!e||0===Object.keys(e).length;return Object.keys(o).forEach(t=>{o[t]&&(i[t]=!0,e&&e[t]&&(r=!0))}),!!r&&i}(m,i))return D;let I=u(D)?D:e;if(y&&(I=await b(y)(e,r,n)),g&&(I=d(e,g,D)),O){const[t,o]=O,i="this"===t?[e]:await v(e,t,n);c(i)&&(I=(await Promise.all(i.map(e=>v(e,o,n)))).filter(u))}else j?I=await Object.entries(j).reduce(async(t,[o,i])=>{const r=await t,a=await v(e,i,n);return u(a)&&(r[o]=a),r},Promise.resolve({})):h&&(I=await Promise.all(h.map(t=>w(e,t,n))));k&&!await b(k)(I)&&(I=void 0);const N=p(I);return u(N)?N:p(D)},Promise.resolve(void 0))}function y(e){return{window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document,...e}}var g={},O={type:"matomo",config:{},init({config:e,env:t,logger:n}){const{window:o}=y(t),i=o,{settings:r,loadScript:a}=e,{siteId:s,url:c}=r||{};s||n.throw("Config settings siteId missing"),c||n.throw("Config settings url missing"),i._paq=i._paq||[];const u=i._paq.push.bind(i._paq);if(a&&(!function(e,t){const{document:n}=y(t),o=n,i=o.createElement("script");i.type="text/javascript",i.src=e+"matomo.js",i.async=!0,i.defer=!0,o.head.appendChild(i)}(c,t),u(["setTrackerUrl",c+"matomo.php"]),u(["setSiteId",s])),(null==r?void 0:r.disableCookies)&&u(["disableCookies"]),!1!==(null==r?void 0:r.enableLinkTracking)&&u(["enableLinkTracking"]),(null==r?void 0:r.enableHeartBeatTimer)&&u(["enableHeartBeatTimer",r.enableHeartBeatTimer]),null==r?void 0:r.customDimensions)for(const[e,t]of Object.entries(r.customDimensions))u(["setCustomDimension",Number(e),t])},async push(e,{rule:t={},data:n,env:o}){const{window:i}=y(o),r=i,a=r._paq.push.bind(r._paq),s=t.settings||{};if("page view"===e.name&&!t.settings)return void a(["trackPageView",await v(e,"data.title")]);const u=c(n)?n:[n];if(s.siteSearch)a(["trackSiteSearch",...u]);else if(s.contentImpression)a(["trackContentImpression",...u]);else if(s.contentInteraction)a(["trackContentInteraction",...u]);else{if(s.customDimensions)for(const[t,n]of Object.entries(s.customDimensions)){const o=await v(e,n);void 0!==o&&a(["setCustomDimension",Number(t),o])}if(a([e.name,...u]),s.goalId){const t=s.goalValue?await v(e,s.goalValue):void 0;a(["trackGoal",s.goalId,t])}}}};var j,h=O;return j=i,((i,r,a,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let c of n(r))o.call(i,c)||c===a||e(i,c,{get:()=>r[c],enumerable:!(s=t(r,c))||s.enumerable});return i})(e({},"__esModule",{value:!0}),j)})();
@@ -0,0 +1,78 @@
1
+ import { Destination as Destination$1, Mapping as Mapping$1 } from '@walkeros/core';
2
+ import { DestinationWeb } from '@walkeros/web-core';
3
+
4
+ declare global {
5
+ interface Window {
6
+ _paq?: Array<unknown>;
7
+ }
8
+ }
9
+ interface Settings {
10
+ /** Matomo Site ID (required). */
11
+ siteId: string;
12
+ /** Base URL of Matomo instance, e.g. https://analytics.example.com/ (required). */
13
+ url: string;
14
+ /** Disable all tracking cookies for cookie-free analytics. */
15
+ disableCookies?: boolean;
16
+ /** Enable automatic outlink and download tracking. Default: true. */
17
+ enableLinkTracking?: boolean;
18
+ /** Enable heart beat timer with interval in seconds for accurate time-on-page. */
19
+ enableHeartBeatTimer?: number;
20
+ /** Custom dimensions applied to all events. Keys are dimension IDs, values are property paths. */
21
+ customDimensions?: Record<string, string>;
22
+ }
23
+ type InitSettings = Partial<Settings>;
24
+ interface Mapping {
25
+ /** Goal ID to track a conversion alongside this event. */
26
+ goalId?: string;
27
+ /** Property path for goal revenue value (e.g. data.revenue). */
28
+ goalValue?: string;
29
+ /** Track as internal site search via trackSiteSearch. */
30
+ siteSearch?: boolean;
31
+ /** Track as content impression via trackContentImpression. */
32
+ contentImpression?: boolean;
33
+ /** Track as content interaction via trackContentInteraction. */
34
+ contentInteraction?: boolean;
35
+ /** Per-event custom dimensions. Keys are dimension IDs, values are property paths. */
36
+ customDimensions?: Record<string, string>;
37
+ }
38
+ interface Env extends DestinationWeb.Env {
39
+ window: {
40
+ _paq: Array<unknown>;
41
+ location?: {
42
+ href?: string;
43
+ };
44
+ };
45
+ document: {
46
+ createElement: (tagName: string) => {
47
+ type: string;
48
+ src: string;
49
+ async?: boolean;
50
+ defer?: boolean;
51
+ };
52
+ head: {
53
+ appendChild: (node: unknown) => void;
54
+ };
55
+ };
56
+ }
57
+ type Types = Destination$1.Types<Settings, Mapping, Env, InitSettings>;
58
+ type Destination = DestinationWeb.Destination<Types>;
59
+ type Config = DestinationWeb.Config<Types>;
60
+ type Rule = Mapping$1.Rule<Mapping>;
61
+ type Rules = Mapping$1.Rules<Rule>;
62
+
63
+ type index_Config = Config;
64
+ type index_Destination = Destination;
65
+ type index_Env = Env;
66
+ type index_InitSettings = InitSettings;
67
+ type index_Mapping = Mapping;
68
+ type index_Rule = Rule;
69
+ type index_Rules = Rules;
70
+ type index_Settings = Settings;
71
+ type index_Types = Types;
72
+ declare namespace index {
73
+ export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_InitSettings as InitSettings, index_Mapping as Mapping, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Types as Types };
74
+ }
75
+
76
+ declare const destinationMatomo: Destination;
77
+
78
+ export { index as DestinationMatomo, destinationMatomo as default, destinationMatomo };