spraakbanken / flask-matomo2

Track requests to your Flask website with Matomo
http://flask-matomo2.readthedocs.io/
MIT License
0 stars 0 forks source link

Tracking call failed (status_code=500) #46

Closed NiTRoeSE closed 6 months ago

NiTRoeSE commented 10 months ago

Hi, i recently switched from original repo to this ( thankfully existent ) Fork of flask-matomo. Since that i cant get it working again. The configuration is nearly equal to orig. repo but i always get a "tracking call failed" .. with nothing more than this line of error.

Background is: Flask > 2.3 didn't work together with orig. flask-matomo because of deprecated imports etc. So it would be create if you can tell me what i can do to catch the problem that i always get a Tracking call failed (status_code=500).

My config:

from app_secrets import MATOMO_URL
from app_secrets import MATOMO_TOKEN
from flask_matomo2 import Matomo

app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app, x_prefix=1, x_for=1, x_host=1)

matomo = Matomo(app, matomo_url=MATOMO_URL,
                id_site=3, token_auth=MATOMO_TOKEN,
                ignored_patterns=["/static/*"])

The URL , the api keys etc are valid if i used it e.g with curl for testing. Thanks in advanced!

kod-kristoff commented 7 months ago

Hi, and sorry for the very late reply! I have totally missed it, have you solved the problem?

I will look in to it, what version of Flask are you using, and what version of Matomo are you using?

kod-kristoff commented 7 months ago

And what does ProxyFix do in your code?

kod-kristoff commented 6 months ago

@NiTRoeSE I can't reproduce this error, but I am working on a release where the tracking are POST:ed to matomo instead, maybe this will solve your problem?