How can I get idSubTable from every site I have?

That, I have 7 sites and I want to know how can I get the idSubTables from each of them when I change the date and period on each site. ( I am using only one custom var)

I mean:

Site 1:

idSite = 1
period = day
idSubTable = 30

idSite = 1
period = week
idSubTable = 3

Site 2:
idSite = 2
period = day
idSubTable = 32

idSite = 2
period = week
idSubTable = 4

I searched into the forum and in Framework Reference - Piwik but I can’t get with a solution.

Thanks in advance.

You will have to call each site separately to fetch each subtable…

Yes, that’s what I did.

That idSubTable should be always the same, true? I mean if in the site 1 the idSubTable is 32, that id never change?

Thanks Matt.

it will change for each day and you must request the parent table for the day/period you request.