Valider 2c338e37 rédigé par Bruno Boiget's avatar Bruno Boiget
Parcourir les fichiers

feat(matomo): integrate Matomo client

parent 164d8ad3
Chargement en cours
Chargement en cours
Chargement en cours
Chargement en cours
Chargement en cours
+4 −0
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -9,6 +9,10 @@
        "useLocationOrigin": true
      }
    },
    "matomo": {
      "siteIdMezig": 1,
      "urlBase": ""
    }
  },
  "keycloak": {
    "pubkey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvyVtOgah8FjiXmFcnavID9b0lEhCl5k7jISPkPweOQtB1+hRAajcT7Y4v9babrUAXVL7bAb8nRTJVrks3Jl+o/nfZjfLxx7vIE1mMsRGVAqPg88UgyP79fFBvWdPnrIaIweNqlH5r1WoBOVjsoX0rFNijZqQ5llcC/uUYQW35urjGUJIZlHDSOdp34qnrrnohE3714PUuiKHhqFx15MpzmO/KQuIt0lJXuJ3NgAwt1OndksvP03Kkm0ls7IvveF0GiM2dki2xPRAHvv3jC1hLdHm0kGdrn+EndX0xFwBl9kL5zcjILGwm1gyfeJdfzOQrBUf6WL+FpgNseWq5MD+vwIDAQAB",
+12 −0
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -4,6 +4,7 @@
  import { Meteor } from 'meteor/meteor';
  import { useTracker } from 'meteor/rdb:svelte-meteor-data';
  import { _ } from 'svelte-i18n';
  import Matomo, { matomo } from '@dexlib/svelte-matomo';
  import Search from './pages/Search.svelte';
  import Profil from './pages/Profil.svelte';
  import Nav from './components/Nav.svelte';
@@ -15,12 +16,14 @@
  import Maintenance from './pages/Maintenance.svelte';
  import NoAccount from './pages/NoAccount.svelte';
  import AppSettings from './../api/appsettings/appsettings';
  import { onMount } from 'svelte';

  export let url = '';
  let userRedirect = false;
  let profileOk = true;
  let userActive = false;
  const { laboiteUrl, enableKeycloak = true } = Meteor.settings.public;
  const { matomo: matomoSettings } = Meteor.settings.public;
  $: settings = useTracker(() => {
    const sub = Meteor.subscribe('appsettings.all');
    if (sub.ready()) {
@@ -28,6 +31,12 @@
    }
    return { maintenance: true, textMaintenance: '' };
  });

  onMount(() => {
    if (matomoSettings?.urlBase) {
      matomo.trackPageView();
    }
  });
</script>

{#if $isLoading}
@@ -45,6 +54,9 @@
          </Route>
        </div>
      {:else}
        {#if matomoSettings?.urlBase}
          <Matomo url={matomoSettings.urlBase} siteId={matomoSettings.siteIdMezig} />
        {/if}
        <div>
          <Route path="/profil/:publicName" component={Profil} />
          {#if !enableKeycloak}
+11 −0
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -11,6 +11,7 @@
      "dependencies": {
        "@babel/core": "^7.22.17",
        "@babel/runtime": "^7.22.15",
        "@dexlib/svelte-matomo": "^0.1.4",
        "@smui/button": "^6.1.4",
        "@smui/chips": "^6.1.4",
        "@smui/common": "^6.1.4",
@@ -430,6 +431,11 @@
        "node": ">=6.9.0"
      }
    },
    "node_modules/@dexlib/svelte-matomo": {
      "version": "0.1.4",
      "resolved": "https://registry.npmjs.org/@dexlib/svelte-matomo/-/svelte-matomo-0.1.4.tgz",
      "integrity": "sha512-Ki18Xxf02NY9so7eZcTHcH9Xs2gSe1ENaV6/4YQmJ38gCbbCSfI0i1ZpT0Fdep2LgrIlYg66WU5RWS6OOzffCQ=="
    },
    "node_modules/@esbuild/android-arm": {
      "version": "0.19.2",
      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.2.tgz",
@@ -7813,6 +7819,11 @@
        "to-fast-properties": "^2.0.0"
      }
    },
    "@dexlib/svelte-matomo": {
      "version": "0.1.4",
      "resolved": "https://registry.npmjs.org/@dexlib/svelte-matomo/-/svelte-matomo-0.1.4.tgz",
      "integrity": "sha512-Ki18Xxf02NY9so7eZcTHcH9Xs2gSe1ENaV6/4YQmJ38gCbbCSfI0i1ZpT0Fdep2LgrIlYg66WU5RWS6OOzffCQ=="
    },
    "@esbuild/android-arm": {
      "version": "0.19.2",
      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.2.tgz",
+1 −0
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -17,6 +17,7 @@
  "dependencies": {
    "@babel/core": "^7.22.17",
    "@babel/runtime": "^7.22.15",
    "@dexlib/svelte-matomo": "^0.1.4",
    "@smui/button": "^6.1.4",
    "@smui/chips": "^6.1.4",
    "@smui/common": "^6.1.4",