Matomo tracking HTTP API of a website hosted in subfolder

Hi,

Considering the following website :

https://domain.com/mywebsite/my-page.html

Using the HTTP Tracking API with the url param :

url : https://domain.com/mywebsite/my-page.html

When I retrieve the data, I should have on the actions page :

-my-page.html

But I have :

-mywebsite
–my-page.html

Am I missing something ? I have set the analytics profil :

url : https://domain.com/mywebsite as the root path.

Yes because your page is located under mywebsite folder…
In your tracking, you just have to set the url as https://domain.com/my-page.html instead of https://domain.com/mywebsite/my-page.html

1 Like

Thank you Philippe for your quick answer.

Isn’t a bit “hacky” ? Is there no other way to tell Matomo that the root website in in a folder (domain.com/mywebsite) and not a root domain (domain.com) ?

Thank you again,

I don’t see another way…

Alright, thanks for your help !