Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLs ending in "/" get "/index.php" appended #13365

Closed
thesteffi opened this issue Aug 29, 2018 · 3 comments
Closed

URLs ending in "/" get "/index.php" appended #13365

thesteffi opened this issue Aug 29, 2018 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@thesteffi
Copy link

Hi,

I am currently experimenting with Matomo - however I am having some trouble. All URLs on our websites (only the developers know why) have trailing slashes appended. So the URL structure is always similar to "https://mybeautifuldomain.tld/category/my-lovely-article/"

Which leads to the behaviour that Matomo creates a subtable (I guess?) only containing "/index" under that specific URL so that the URL in total would be "https://mybeautifuldomain.tld/category/my-lovely-article/index"

Which is bothersome in prebuild reports (but not really an issue) but is a lot worse to be dealt with in API exports.

{
"label": "equipment",
"nb_visits": 4321,
"nb_hits": 4789,
"sum_time_spent": 343528,
"nb_hits_with_time_generation": 4659,
"min_time_generation": "0.001",
"max_time_generation": "21.63",
"sum_bandwidth": 0,
"nb_hits_with_bandwidth": 0,
"min_bandwidth": null,
"max_bandwidth": null,
"entry_nb_visits": 3593,
"entry_nb_actions": 4965,
"entry_sum_visit_length": 996006,
"entry_bounce_count": 2921,
"exit_nb_visits": 3627,
"nb_hits_following_search": 48,
"avg_bandwidth": 0,
"avg_time_on_page": 72,
"bounce_rate": "81%",
"exit_rate": "84%",
"avg_time_generation": 0.369,
"idsubdatatable": 207,
"subtable": [
{
"label": "gewinnspiel-coffee-custom-cabs",
"nb_visits": 75,
"nb_hits": 80,
"sum_time_spent": 2715,
"nb_hits_following_search": 1,
"nb_hits_with_time_generation": 78,
"min_time_generation": "0.005",
"max_time_generation": "21.63",
"sum_bandwidth": 0,
"nb_hits_with_bandwidth": 0,
"min_bandwidth": null,
"max_bandwidth": null,
"entry_nb_visits": 58,
"entry_nb_actions": 86,
"entry_sum_visit_length": 6126,
"entry_bounce_count": 45,
"exit_nb_visits": 58,
"avg_time_on_page": 34,
"bounce_rate": "78%",
"exit_rate": "77%",
"avg_time_generation": 0.434,
"idsubdatatable": 208,
"subtable": [
{
"label": "/index",
"nb_visits": 75,
"nb_hits": 80,
"sum_time_spent": 2715,
"nb_hits_following_search": "1",
"nb_hits_with_time_generation": 78,
"min_time_generation": "0.005",
"max_time_generation": "21.63",
"sum_bandwidth": 0,
"nb_hits_with_bandwidth": 0,
"min_bandwidth": null,
"max_bandwidth": null,
"entry_nb_visits": 58,
"entry_nb_actions": 86,
"entry_sum_visit_length": 6126,
"entry_bounce_count": 45,
"exit_nb_visits": 58,
"sum_daily_nb_uniq_visitors": 71,
"sum_daily_entry_nb_uniq_visitors": 55,
"sum_daily_exit_nb_uniq_visitors": 55,
"avg_time_on_page": 34,
"bounce_rate": "78%",
"exit_rate": "77%",
"avg_time_generation": 0.434,
"url": "https://www.gitarrebass.de/equipment/gewinnspiel-coffee-custom-cabs/"
}
]
}
]
}

So it basically adds another layer to the json file. Is there any way to either remove the trainling slashes bevore they hit database or to prevent /index from beeing added?

Best,
Stefanie

@thesteffi
Copy link
Author

This is the api statement currently used (for the sake of completeness):

/index.php?module=API&method=Actions.getPageUrls&idSite=1&period=day&date=yesterday&format=JSON&expanded=1&filter_limit=-1

@mattab
Copy link
Member

mattab commented Aug 29, 2018

Hi, please try using flat=1 in the API export URL

@thesteffi
Copy link
Author

Thanks for your help! @mattab that's it. Tried, tested and approved ;)

@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants