Get pageviews via special part of the URL?

Hey, i am searching for a solution to get the pageview of many Pages.

At first I found out that i can realise it via: Actions.getPageUrl&pageUrl=

This is my URL-structure:
http://www.mypage.com/var1/var2/var3/var4/8164/

Now my problem is, that var1 - var4 can change. Just the last ID is uniqu and will never change.
So if the url will change someday getPageUrl will reset my pageviews. Cause the URL that i will send to piwik is different.

Is there an option to send a request to piwik with just the uniqu ID? Or is there a other way to get the Pageviews from my Sites.

Thanx
Basti

Hi Basti,

For now you can do this in JavaScript directly by using setCustomUrl method - you can create your own unique urls and set them as alias url.

Great :slight_smile: thank you very much… that is what i was searching for.

Now I have one more last question.
With Actions.getPageUrl&pageUrl I just get the following paramters.

[{“label”:"/index",
“nb_visits”:9,
“nb_uniq_visitors”:7,
“nb_hits”:10,
“sum_time_spent”:74,
“nb_hits_following_search”:“1”,
“nb_hits_with_time_generation”:“10”,
“min_time_generation”:“0.009”,
“max_time_generation”:“2.811”,
“entry_nb_uniq_visitors”:“6”,
“entry_nb_visits”:“8”,
“entry_nb_actions”:“45”,
“entry_sum_visit_length”:“1041”,
“entry_bounce_count”:“3”,
“exit_nb_uniq_visitors”:“3”,
“exit_nb_visits”:“4”,
“avg_time_on_page”:8,
“bounce_rate”:“38%”,
“exit_rate”:“44%”,
“avg_time_generation”:0.615,
“url”:“http://www.mypage.com/var1/var2/var3/var4/8164/ /”}]

Is it possible to get more Information like.

  • Where the visitors came from (Wbesites & Countries)
  • How many visitors had been on this page at the same time
  • How many visitors used mobile and how many desktop devices

Can I set some params at the request to get this information?