Piwik: Get graph of unique visitors in custom date range using ImageGraph API - matomo

I only just started using piwik but am already stuck.
I want to get a graph showing the unique visitors of a custom date range (from February to April), so a count for each day. Just as it's displayed in Piwik under "Visitors => Overview". But somehow that doesn't seem possible with the ImageGraph API.
What I'm trying to do (using the ImageGraph API):
I want to display a graph showing the number of unique visitors per day in a certain date range.
Below I want to display a graph showing all goal conversions per day for the same date range.
It's supposed to show the relation between the two values since it's highly relevant if an increase in conversion is accompanied by an increase in unique visitors.
It would be great if both sparklines were in the same graph but I don't think that's possible.
Does anyone have an idea of how to achieve this? Any help would be appreciated.
Thomas

For daily visits you can generate the graphic by calling the next URL :
$this->baseSite.
'index.php?module=API&graphType=evolution&width=800&height=200&method=ImageGraph.get&idSite=' .
$this->siteId . '**&period=day**'. **'&date=' .
$this->startDate->format('Y-m-d') . ',' .
$this->endDate->format('Y-m-d')** .
'&apiModule=VisitsSummary&apiAction=get&token_auth='.
$this->apiKey

Related

How do I create a default everyday date dimension?

I am trying to create a line chart counting all the optins per date, however the only dimension that is will allow me to choose from have to be a date column on my source. The problem with this is it only chooses from dates that are populated in those fields with an optin date.
For example: I have 5 optins on 1/1/2019, 0 on 1/2/2019, and 3 on 1/3/2019
If I use this series and want to include another metric, 1/2/2019 will not show anything for that other metric
I just want a standard everyday series that counts every metric on a given day. The google analytics connection source has a generic Date dimension but I can not figure out how it was done
Ive tried creating a new column with everydate on it and trying to use that as a dimension without any luck
You should be able to use a Time Series graph (of which there are 3 types) instead of a Line graph.
A Time Series will keep the days where no data is available unlike the Line Graph which only presents labels for those which have values in the data.

Index Match multiple criteria and multiple rows google sheets

I am trying to match date and time, and metric category with multiple rows in a data sheet. Currently, I record metrics every day in a similar function with a set of rows showing metric data based on intervals of time. These rows are broken up by date.
I would like to be able to add to a dashboard the current metrics without someone needing to dig through the tables I am recording in. This would require the metric to stay up there until the next interval changed.
I will use =SPLIT(NOW) for the date and time but for now I would like to at least get this to work with static interval and date. I tried using Index Match using AND(), & etc and I cannot get it to work. I also tried to use an array but it errors every time.
Google Sheets Index Match Multi Criteria
If the time intervals for each day will be exactly the same and the data structure will never change with 3 identical lines per day (as per your screenshot) than I think you are overcomplicating things a little:
B2:
=index($A$7:$E$15,MATCH($A$1,$A$7:$A$15,0)+1,MATCH(B$1,$A$7:$E$7,0))
B3:
=index($A$7:$E$15,MATCH($A$1,$A$7:$A$15,0)+2,MATCH(B$1,$A$7:$E$7,0))
B4:
=index($A$7:$E$15,MATCH($A$1,$A$7:$A$15,0)+2,MATCH(B$1,$A$7:$E$7,0))

Google Sheets Array/Filter for Newest Date/Unique ID

I have a sheet "RawCount" with Google Form results that will accumulate over time (people will make entries each week or as their raw number changes).
I need a way to compile the data to obtain the most recent entry for each individual who has entered data via the form:
This data will accumulate with new entries over the period of eight months from up to 100 or more different people.
I would like to sum the most recent entries for each individual onto another tab in the same Google Sheet that contains a scorecard.
Thanks for any help you can offer. I think I've sprained my brain on this.

What is the optimized way for queries on partial dates in GAE Text Search?

Need to get entities filtering by month instead of complete date values (E.g. Birthdays) using Google App Engine Text Search. On verifying GAE docs, I think it is not possible to query date fields by month directly.
So in order to filter them by month/date, we consider saving each date sub value like Date(DD), Month(MM) and Year(YYYY) as separate NUMBER field along with complete date field.
I verified locally that we can achieve by saving like this. But is this the correct way of saving dates by splitting each field when we want to query on date sub values?
Is there any known/unknown limit on number of fields per document apart from 10GB size limit in GAE Text Search?
Please suggest me.
Thanks,
Naresh
The only time NUMBER or DATE fields make sense is if you need to query on ranges of values. In other cases they are wasteful.
I can't tell from your question exactly what queries you want to run. Are you looking for a (single) specific day of the month (e.g., January 6 -- of any year)? Or just "anything in June (again, without regard to year)"? Or is it a date range: something like January 20 through February 19? Or July 1 through September 30?
If it's a range then NUMBER values may make sense. But if it's just a single specific month, or a single month and day-of-month combination, then you're better off storing month and day as separate ATOM fields.
Anything that looks like a number, but isn't really going to be searched via a numerical range, or done arithmetic on, isn't really a number, and is probably best stored as an ATOM. For example, phone numbers, zip codes (unless you're terribly clever and wanting to do something like "all zip codes in San Francisco look like 941xx" -- but even then if that's what you want to do, you're probably better off just storing the "941" prefix as an ATOM).

Reporting Services Chart - Hard Coded Series

I am developing an SSRS 2008 report which contains a number of simple charts. On the x axis I have the 12 months of this year - Jan 2009 thru December 2009. On the Y is an integer value ranging from 0 to 100 in increments of 10. I am plotting the number of times an issue occurred per month. So January could have a value of 10, February 30, etc. etc.
I would like to have a horizontal line/series that is constant and shows the yearly average for 2008. So, say the average was 30 issues per month in 2008, I would like for that line to be shown in my chart. Basically, I want to draw a straight line across the chart for that value... I can see how to add more complex series, but this seemingly simple task is getting the better of me.
Doe anyone have any idea how this could be accomplished?
Thanks in advance,
Jason
[Update] To add some further details, I am already pulling the average for each row in my dataset and have it set up as its own series. However, rather than plotting a line, this approach plots individual points for each month. While this is close to what I want, I need to join the dots so to speak. The chart is of the Error Bar (Range) variety.
Can you use a column / line hybrid chart? If so then add a constant or dynamic target value to the chart:
Design the chart.
On the Data tab in the Chart Properties dialog box, add a new data value (for example, Target).
Set the target value (see the example in Figure 9 on link this uses a constant target value of 100000 across all categories but you can do it dynamically too). Make sure to use an expression starting with = (equals). Otherwise, the value is not interpreted as a numeric value.
See the example on the MS charts page at http://msdn.microsoft.com/en-us/library/aa964128.aspx
Add the yearly average to each row in the underlying the query. Add data series on just that value.
I managed to solve this issue myself.
As I mentioned, I was using an Error Bar graph. Right-clicking on the series of interest, I was able to change the graph type for that particular series - essentially leaving me with a chart with multiple graphs in it...particularly simple if you know where to look - which i did not! Thanks everyone for your suggestions.

Resources