Tracking querystring variables per page

Hi,

So, I’m sure I’m missing something.

How do I track page views with a breakdown for a particular querystring variable via the API?

So, let’s say I have the querystring variable ?myId=blah

How can I pull back, for each page, the number of views by the value of myId?

So let’s say 1000 visits to page x.

700 are to the base page itself with no query string parameter.

And then 100 each to ?myId=1, ?myId=2, ?myId=3

How can I get that information from Piwik?

I’ve been trying to figure it out, but I guess I’m just dumb today. :frowning:

Any help much appreciated.

Cheers!

I’ve been doing more digging - and I’m not sure this is even possible.

Is there a way to track visits/page views (anything?) based on a query string parameter that’s page-specific (not a campaign) - not user specific, but page specific?

Basically what we want to achieve is tracking of different versions of a page.

So we have page x.

page x has say 3 variations. They’re differentiated by querystring.

x.com/page1 = default
x.com/page1?myId=1 = variation 1
x.com/page1?myId=2 = variation 2
etc.

Any way to do this with Piwik?

For this please consider tracking your page variations as a Custom Variables of scope ‘page’, see the user guide: Custom Variables Analytics - Analytics Platform - Matomo - hope it helps?

Now how did I miss scope=page ?

Looks like that will work, thanks! Will do a bit more digging this week to make sure - but now I’ve got a clear direction :slight_smile: