Data Whimsy
  • Home
  • What is Matomo
  • Contact
  • Custom Reports
  • Connect Matomo to other software
  • CLI API etc
  • Matomo Tag Manager Simple Guide
  • Lyn Only
  • Troubleshooting + Deploying Matomo
  • Weird Data
  • Why is data in Matomo giving different numbers than Google Analytics
  • The Dashboard
  • Moving the Data
  • Book Club Forum

The Matomo Dashboard

Matomo Raw data: "Visits Log" examples

3/28/2024

0 Comments

 
Other parts of Matomo make you wait for hours, unless you enable browser-based archiving.
But your site visit data shows up instantly in Visits Log.

Visits Log is the same as "Raw Data".
What is the difference between RAW data and report data?
​
Picture
Site search. This is Matomo automatically detecting any parameter like keyword, search, query, searchword, k, s, or q. I created the raw data by entering the following, one at a time in a browser:
  1. ​https://littlefurnace.com/info?q=gggg
  2. https://littlefurnace.com/info?query=hhhh
  3. https://littlefurnace.com/info?s=iiii
  4. https://littlefurnace.com/info?search=kkkk
  5. https://littlefurnace.com/info?searchword=LLLL
  6. https://littlefurnace.com/info?k=mmmm
  7. https://littlefurnace.com/info?keyword=nnnn
Picture
I created the raw data above by entering in a browser these:
1. https://littlefurnace.com/index.html
2. https://littlefurnace.com/info?search=Banana

 Notice that it says "2 actions". Only the first one counts as an action:pageview in Matomo.
The second counts as an action:search. 

Picture
I created this by cheating. In a browser, I entered https://littlefurnace.com/matomo/matomo.php?rec=1&idsite=1
​I did it twice.  If you do this in your browser you will see a black screen (no actual pageload).  If you want to see your visit, head on over to my website littlefurnace.com and click open-matomo.
Picture
First, I set up a couple tags in Matomo Tag Manager.
I configured one tag that uses a Javascript listener to detect any click on the page, even if the click is just on something nonclickable (it detects if you click ANYthing). Its configuration is "event", "click anywhere", "anything anything anything".
Then I made another tag in MTM.  It is "event", "click on a link", "a link - a click, a palpable click" (paraphrasing Polonius, Act 5, Hamlet).  

Now, take a look at the screenshot of Visits Log above. There are a few things going on here.
  • I hit "reload" five times.
  • I clicked around my website with the mouse, being careful to not click an actual link.
  • I reloaded again.
  • I left, to an external page at empathytheatreproject.com.
  • I came back to my site, clicked blank space on my web page and then clicked a real working link on my website.
  • I clicked the outlink again, at empathytheatreproject.com.
Picture
I took a URL that I usually visit, https://littlefurnace.com/info

Yellow part above

I manually typed a couple mtm tags (mtm_campaign, mtm_medium) and one random tag (author).
Matomo scans incoming URLs for all three of these parameters. If it finds the mtm or utm parameters, Matomo automatically tallies the visit. UTM/MTM URL visits show up in two places: on the left side of visits log, as shown here, and also in the menu under Acquisition >> Campaigns.

Blue part above
I manually typed "author=dickenson" into my URL of the page I was visiting. To Matomo, author is nonsense, unless I set it in the config to be a recognized parameter. So author shows up here.

Red part above
In my browser, I visited three things, in this order
1. I visited https://littlefurnace.com/info?mtm_campaign=mustard&utm_medium=lunchbox&author=dickenson
2. I clicked on KEXP.org. I then closed my littlefurnace.com/info tab completely.
3. I opened a new tab, and I went to littlefurnace.com/info

Pageviews

The session above would have a total of
pageviews = 2
hits = 5

0 Comments

example.com and example.com/this

2/15/2024

0 Comments

 
Here is how the data accrues if
Site 1 is littlefurnace.com/info and
Site 2 is littlefurnace.com

You can see the overlap, marked in yellow and blue, below.
But there will be no overlap if I use the default code. To return to that default code, I just need to remove four lines that I forgot I had put into my Matomo JS tracker script in the header of my website.  Main point: A URL with a subdomain, or a subpath can visually look like it will tell littlefurnace.com AND littlefurnace.com/info bout my visit, but it can't unless my ten lines of JS in the HTML header have both of my websites listed.  If you scroll down to my code, you see I have a line that reports Site ID = 1 and Site ID = 5. If I remove the lines about Site ID  = 1, there will be no tracking data sent to Site 1 (littlefurnace.com). 

In other words, you can prevent the domain from tracking the subdomain by simply altering the script you insert in the header of that served site page.

What about the opposite: you DO want the data to go to two site IDs? You can adapt from my code below. The official guide is here:
 matomo.org/faq/how-to/how-do-i-send-tracking-requests-to-two-or-more-matomo-servers/
Picture
Picture
Picture
Picture
0 Comments

Spitballing a campaign URL

12/5/2023

0 Comments

 
Picture
In Matomo we went to dashboard >> acquisition >> campaign URL builder

Here is the URL we made in the above screenshot:
https://pikl.us/?mtm_campaign=bbb&mtm_kwd=ccc&mtm_source=ddd&mtm_medium=eee&mtm_content=fff&mtm_cid=123&mtm_group=ggg&mtm_placement=hhh

Next step is to place this URL in our newsletters, our ads, and our social posts.

See more here at the official Matomo help pages: https://matomo.org/subcategory/campaigns/
0 Comments

Most underrated Matomo guides

11/28/2023

0 Comments

 
For my own use, a list of Matomo FAQs which are hard to re-locate.

I don't know if these are non-memorable in title or just hard to search by terminology. Bookmarking them here for my own use.

  1. Almost all reports and dates are working fine except one or a small number of days/weeks/months/date ranges which display zero visit. How do I fix this issue and restore the missing data?

And, as a reminder, here are gigantic, often overlooked places to further glean Matomo secret knowledge:
  1. A list of every Matomo configuration from the config/config.ini.php configuration file. Shows both the default settings and hundreds of helpful comments by the developers.
  2. Issues list at Github.  No matter what you are searching for, it has been mentioned somewhere in the 15 years of conversations here. These are supposed to only be core issues but people don't always limit themselves to core issues here.
0 Comments

Options for finding the location of your visitors

11/21/2023

0 Comments

 
There are four options for considering where your visitors are from. These options are at dashboard >> ⚙️ >> System >> Geolocation :
  1. DON'T TRY AT ALL. Don't detect any location. Matomo will still work fine. This is very private but much of the reason for using web analytics at all is eroded if you don't know the location of the visitor.
  2. GUESS, FROM THE LANGUAGE OF THE VISITOR: detect location using the requested language (such as FR-CA) set by the visitor's operating system and guess the country based on that. This is the least accurate. You will not be able to distinguish Lyons from Paris, or Los Angeles from New York. And site traffic from a visitor located in Los Angeles, but who has CN-TR language on their computer will be attributed as being located in Taiwan.
  3. IN MATOMO, COMPARE THE IP TO A THIRD PARTY DATABASE OF LOCATIONS BY IP. From the arriving http request, use the IP address*. Map the IP to a physical location using one of our recommended third party services. This is by far the most popular option. Almost everyone does this.
  4. IN YOUR WEB SERVER DO 3. Same as 3, but instead of doing it in the PHP code, do it in a module that you add to the Apache/nginx server. This is more work but it is fast. Do this way if you have a high traffic site which needs fast processing.

    * The IP address can be used as is (eg 255.255.255.255) or it can be set to consume the anonymized address (see below).


Beware of saying yes to the anonymized address
In Option 3, above, you have a cool option. You can:
  • use the full IP address (255.255.255.255) during geolocation (more accurate!) but then scrub as many of the places as you want and store it like this in your database, (255.0.0.0), so that you don't know your user's exact IP address.
  • otherwise, you can use the scrubbed address (255.0.0.0) during geolocation (and get terrible results), and store the scrubbed geolocation in your database too.

To get the first way, say No, here:

Picture

If you say No, you get the data on the left. If you say Yes, you will get the data on the right in this screenshot.
Picture
0 Comments

Twenty Things to Know About Matomo

11/8/2023

0 Comments

 
Knowing these will take you from Matomo beginner to Matomo champ. These are external links to the most popular articles in the official documentation at Matomo.org.
  • Matomo doesn’t track any visits and pages, and shows “There is no data for this report” in all reports.
  • How do I fix the error “Mysql Server has gone away”?
  • What are the cookies created by Matomo JavaScript Tracking client?
  • What does “Keyword not defined” mean in the Referers > Search Engines keywords report?
  • After the top 500 or top 1000 rows, Matomo automatically groups pages, keywords, websites, etc. under the label “Others”; How do I force Matomo to not limit the data?
  • What is the token_auth and where can I find this token to use in the API calls?
  • What data does Matomo track?
  • How do I fix the errors “Unable to write in the cache directory” or “The directory matomo/tmp/cache/*” is not writable.”?
  • How to Set up Auto-Archiving of Your Reports
  • What to do when you see curl: (60) SSL certificate problem: unable to get local issuer certificate error?
  • Implement event tracking with Matomo
  • How do I fix the Mysql error “Connection refused”?
  • How do I start tracking data with Matomo on websites that use React?
  • How do I install the Matomo tracking code on WordPress?
  • Set up User ID tracking in Matomo
  • The Visitor Profile
  • Setting up accurate visitors geolocation
  • Configure Privacy Settings in Matomo
  • SQL Cookbook: recipes for Matomo SQL Queries
  • SQL Database Schema for Matomo
  • Et cetera
0 Comments

Google Data will differ from Matomo Data

11/3/2023

0 Comments

 
Google Analytics will give different pageviews + visits versus Matomo Analytics.  You should worry both more and less than you do now. 

GA is great. Matomo is great. Coffee and tea are both great too.  But you should drink one at a time.

Why you should worry more than you do:
You might have set up something wrong in GA or in MA.  This can result in certain pages or events counting twice as much as you intend or counting not at all.  I work at Matomo and twice I remember a customer complaining that their hits in Matomo were exactly half of their hits in Google.  Guess what the solution was: we looked at their pages and saw that the Universal Analytics tag was firing twice. It had been going on for who knows how many months or years.

Why you should worry less than you do:
The data can come in accurately in both tools and you may be looking at differing definitions. Or something is disabled and you need to re-enable it.  A nice thing about Matomo Analytics is, it does a lot more things with the data than Google. And it is out in the open: you can see all the pieces and other people (smart people) can and that's called a community. 

Unique visitors:
If you have the Unique Visitor Metrics enabled for the Date Range period then Matomo will be accurately counting the total number of unique visitors for that period.

The only time that this metric would count visitors as one visitor each day is in the case where Cookies are disabled - in that case Matomo can only accurately track a unique visitor for up to 24 hours after which a new visitor ID will be generated for that visitor in the absence of cookies.

You can refer to this FAQ for enabling the Unique Visitor metric: https://matomo.org/faq/how-to/faq_113/



One down side of Matomo is it can do too much.  It's a little like driving a five speed car versus driving an automatic transmission car.  Matomo is the 5-speed.  Sometimes you want the transmission to just do its thing so you don't have to think about it.  


By the way, the car transmission analogy (see above) falls short in some ways though, since this is not a car, this is your data. It has value (like real monetary value) and you care about it (like your kids).  If Google were a bank, you would ask them what do you do with my money besides just hang on to it? Guess what: Google doesn't have to tell you. They sort of tell you but it's usually something like this (thank you Brave Browser):

Picture
And if Google Analytics were like your childcare provider, it's like if you left your kids with a mysterious baby sitter all day and every night when you pick them up, they are delivered exactly on time, to the letter of your agreement. But when you ask where were you while you were with the baby sitter, that is unknowable - a total secret, although people say they saw your kids out begging on streetcorners and sewing soccer balls chained to a machine.  Whereas Matomo is more like you drop your kids off at your sister's house: it's in your family and you can ask in great detail how they were handled.

0 Comments

Day 1: Reading the pageviews

10/18/2023

0 Comments

 
In the left side navigation go to Dashboard >> Behaviour >> Pages.

You should see a Pages table. Notice the green control icons BELOW the last row of the table.  If you click the Hierarchical button ⚙️, the table will have expand/collapse sections as seen here:
Picture
This is called Hierarchical View. Its opposite is Flat View.
1. Nothing in the table is a page unless you see the line start with this symbol ("Open Page") . All of the other lines will start with a Expand/Collapse symbol. Those are folders/directories/breadcrumbs/fragments. They are atoms of the overall path to the page.
2. This is the last stage of the URL.
Picture
Here is how the page for https://matomo.org/faq/general/faq_146/index.html actually looks.


PictureHere are the fragments of the URL, shown within the Matomo Hierarchical view.
But what if you don't want this hierarchical version of the URL? Can we show every page on its own line, and no funny business?

One way is to avoid the URL totally and show the titles instead. In the navigation that is
Dashboard >> Behavior >> Page titles

Picture
Under the last line of a Matomo Table there are always these green icons.
  1. Flatten / Hierarchical / Show Totals (it varies from table to table)
  2. Show as a graphic / Show as a Table
  3. Export this data as JSON, XML, CSV, TSV.
  4. Filter!
Picture
The magnifying glass (4) is a filter. The filter can handle regex. Which regex does Matomo use? Matomo is written in PHP, so it uses PCRE2
Here are some regular expressions in Matomo:
  • cats|dogs MATCHES CATS OR DOGS
  • b[aeiou]g MATCHES BAG BOG BUG BEG
  • goo[^g] MATCHES GOOD BUT NOT GOOGLE

Here is a free guide to PHP Regular Expressions:
https://www.w3schools.com/php/php_regex.asp

And here is a user in the Matomo Forum, giving an example of the escapes he used to do a URL. The first fails, the second works:
Picture
0 Comments

    Author

    Evan at https://littlefurnace.com

    Archives

    March 2024
    February 2024
    December 2023
    November 2023
    October 2023

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • What is Matomo
  • Contact
  • Custom Reports
  • Connect Matomo to other software
  • CLI API etc
  • Matomo Tag Manager Simple Guide
  • Lyn Only
  • Troubleshooting + Deploying Matomo
  • Weird Data
  • Why is data in Matomo giving different numbers than Google Analytics
  • The Dashboard
  • Moving the Data
  • Book Club Forum