@socialgouv/matomo-postgres 2.0.2 → 2.1.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.
@@ -16,6 +16,7 @@
16
16
  "userId": "24",
17
17
  "region": "Buenos Aires",
18
18
  "city": "Buenos Aires",
19
+ "resolution": "1920x1080",
19
20
  "dimension1": "guest",
20
21
  "dimension3": "page",
21
22
  "dimension6": "shop",
@@ -36,6 +36,7 @@ const matomoProps = [
36
36
  "referrerName",
37
37
  "siteName",
38
38
  "userId",
39
+ "resolution",
39
40
  ];
40
41
  /** @type Record<string, (a: import("types/matomo-api").ActionDetail) => string | number> */
41
42
  const actionProps = {
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.down = exports.up = void 0;
13
+ const DESTINATION_TABLE = process.env.DESTINATION_TABLE || "matomo";
14
+ function up(db) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ yield db.schema.alterTable(DESTINATION_TABLE).addColumn("resolution", "text").execute();
17
+ });
18
+ }
19
+ exports.up = up;
20
+ function down(db) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ yield db.schema.alterTable(DESTINATION_TABLE).dropColumn("resolution").execute();
23
+ });
24
+ }
25
+ exports.down = down;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@socialgouv/matomo-postgres",
3
3
  "description": "Extract visitor events from Matomo API and push to Postgres",
4
- "version": "2.0.2",
4
+ "version": "2.1.0",
5
5
  "types": "types/index.d.ts",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/index.js",