Skip to content
Snippets Groups Projects
Commit 3282489b authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

matomo: make side-id and git-info strings

They can in theory be arbitrary strings, so don't try to convert them
to a number.

Fixes #52
parent 926b7d5a
No related branches found
No related tags found
1 merge request!63matomo: make side-id and git-info strings
Pipeline #45734 passed
...@@ -6,7 +6,7 @@ export class MatomoElement extends DBPLitElement { ...@@ -6,7 +6,7 @@ export class MatomoElement extends DBPLitElement {
constructor() { constructor() {
super(); super();
this.endpoint = ''; this.endpoint = '';
this.siteId = -1; this.siteId = '';
this.isRunning = false; this.isRunning = false;
this.lastEvent = []; this.lastEvent = [];
this.gitInfo = ''; this.gitInfo = '';
...@@ -20,8 +20,8 @@ export class MatomoElement extends DBPLitElement { ...@@ -20,8 +20,8 @@ export class MatomoElement extends DBPLitElement {
return { return {
...super.properties, ...super.properties,
endpoint: { type: String }, endpoint: { type: String },
siteId: { type: Number, attribute: 'site-id' }, siteId: { type: String, attribute: 'site-id' },
gitInfo: { type: Number, attribute: 'git-info' }, gitInfo: { type: String, attribute: 'git-info' },
auth: { type: Object }, auth: { type: Object },
analyticsEvent: { type: Object, attribute: 'analytics-event' }, analyticsEvent: { type: Object, attribute: 'analytics-event' },
}; };
...@@ -70,7 +70,7 @@ export class MatomoElement extends DBPLitElement { ...@@ -70,7 +70,7 @@ export class MatomoElement extends DBPLitElement {
setupMatomo(loggedIn) { setupMatomo(loggedIn) {
if (loggedIn && ! this.isRunning) { if (loggedIn && ! this.isRunning) {
if (this.siteId === -1) { if (this.siteId === '') {
console.log('site id missing, skipping matomo...'); console.log('site id missing, skipping matomo...');
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment