Id like to track views to a set of pages i have, and make a report of them. Im having trouble as there are so many ways in piwik to do this. there is an api to return info via xml or json etc. this works well to get page information as i have piwik all ready setup. i also noticed theres a way to make custom values in php via a php tracker.
So how do i implement this:
i have a page set of /single_event_page.php?id=
64 where the id= is the event id of my mysql record.
example:
my_doamin/analytics/index.
php?module
=API&metho
d=Actions.
getPageUrl
&pageUrl=/
single_eve
nt_page.ph
p?id=64&id
Site=1&per
iod=range&
date=2013-
12-01,2014
-01-01&for
mat=xml&to
ken_auth=x
xx
returns
<label>/single_event_page.
php?id=64<
/label>
<nb_visits>1</nb_visits>
<nb_hits>2</nb_hits>
this works very well, but im trying to capture multi event listings page views and save them daily and a total for the month in my database
i was thinking of doing this in a cron job at 3:30 am as that california is 3 hours off from us so all of usa hits are properly counted.
and setting up a database table Daily_Views with fields of PAGE_ID, DATE_STAMP,UNIQUE_VIEWS, PAGE_VIEWS
and repeating for Month_Views but having DATE_STAMP being MONTH as the field
this way i can then print my report by page ID getting my event info in a joined table lookup.
so would i capture all the json data and collate to save it to mysql or is there a better way it seams with a large site of 1000's of events this would take a very long time. as id be doing on the first of each month both the prev months totals and the daily totals for that day too making all this lookup take a super long time.
if i do custom values in piwik can i just print a report with all my pages maybe and have piwik do the processing? and not have to save the info to mysql. or even make a php file that uses the api to just display my block of event pages.
some notes:
each event has an author i need to block the event page views for each page for each author ie:
John has events with id's 1,3,7
Jane has events with id's 2,4,5,6
im asking this as its very complicated to me and im not sure the best way to handle my reports of pages.
heres piwiks info as reference
http://developer.piwik.org/api-reference/reporting-api
http://developer.piwik.org/api-reference/PHP-Piwik-Tracker
http://developer.piwik.org/
thank you in advance for any code or help you may provide
Johnny
http://forum.piwik.org/
And, of course, there is the obligatory Professional Services Team. These teams seem to show up with every open-source project. I wonder if they make a lot of money?
http://piwik.org/consulting/
Data bases where the row numbers are counted in the thousands are considered "tiny" by today's standards, so you would not expect to see any performance issues from something like that. This article has some SQL performance guidelines that are applicable to any data base, so if you're concerned about performance, keep these in mind.
https://www.experts-exchange.com/Database/MySQL/A_1250-3-Ways-to-Speed-Up-MySQL.html