Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Matomo
  3. broken app package. The moment your endpoint js/

broken app package. The moment your endpoint js/

Scheduled Pinned Locked Moved Solved Matomo
4 Posts 2 Posters 555 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • luckowL Offline
    luckowL Offline
    luckow
    translator
    wrote on last edited by
    #1

    There are several reasons why your endpoint should not be matomo.php or piwik.php. That's why I tried the endpoint "js/".

    Steps to reproduce:
    choose tag manager
    5adc2c6e-3d39-4967-a6d4-71ddb524286b-image.png

    Click on manage containers and install code from the default container

    a42ac0c3-1979-4140-907b-d5ce2ae3fcbf-image.png

    Copy the code
    21f790e0-9761-43e9-a608-af5acff2b168-image.png

    You only need the matomo endpoint. In my case https://matomo-js-instance.luckow.org/js/

    Open a new browser tab and open the url.
    In a second tab, open the log file of the matomo app on Cloudron.

    Look for errors like:
    PHP Warning: require_once(../libs/upgradephp/upgrade.php): Failed to open stream

    In my case, I fixed a lot of open stream errors.

    in /app/data

    PHP Warning: include(../piwik.php)
    ln -s /app/code/piwik.php .

    PHP Warning: require_once(../libs/upgradephp/upgrade.php)
    ln -s /app/code/libs .

    PHP Warning: require(../../../autoload.php)
    solution is more complex, because there is no easy ln -s for that.
    open file manager and edit js/tracker.php
    in line 44 change PIWIK_INCLUDE_PATH . '/../..') to PIWIK_INCLUDE_PATH . '/vendor')

    Attention: My changes in 44 worked for a moment. I'll have to check it a second time.

    Pronouns: he/him | Primary language: German

    1 Reply Last reply
    0
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #4

      @luckow thanks for reporting. I have made js a runtimeDirs now. Should be fixed in latest package.

      1 Reply Last reply
      1
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by girish
        #2

        @luckow maybe the directory is not meant to navigatable ? If I visit the full URL i.e /js/container_xxx.js, it serves up the js file just fine.

        00712172-f86f-49f3-8455-e2b482817493-image.png

        1 Reply Last reply
        0
        • luckowL Offline
          luckowL Offline
          luckow
          translator
          wrote on last edited by
          #3

          that works as expected. Ok. Next two steps. Edit you container. Switch to Manage Variables. Create new variable. Choose Matomo Configuration. Go down to Tracking Request Target Path and switch from piwik.php to js/

          The idea behind containers: Insert the matomo Tag Manager code into your website only once. If you work with a matamo expert, they can configure matomo without having to change the code on the live website. The container changes every time you change the configuration.

          You can change the endpoint in the variables. The moment we switch from piwik.php to js/ your website sends data to matomo.example.com/js/ instead of matomo.example.com/piwik.php

          If you use the file manager from App settings and open js/index.php you see

          require_once DIR . '/tracker.php'

          If you open tracker.php you find the require once which throws errors in the logfile.

          require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';

          Pronouns: he/him | Primary language: German

          1 Reply Last reply
          1
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            @luckow thanks for reporting. I have made js a runtimeDirs now. Should be fixed in latest package.

            1 Reply Last reply
            1
            • girishG girish marked this topic as a question on
            • girishG girish has marked this topic as solved on
            • luckowL luckow has marked this topic as solved on
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search