@thesteffi opened this Issue on August 29th 2018

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 commented on August 29th 2018

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 commented on August 29th 2018 Member

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

@thesteffi commented on October 29th 2018

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

This Issue was closed on October 29th 2018
Powered by GitHub Issue Mirror