Completely true! I'm an adjunct teacher (meaning I have no tenure) at a non-US state college. Here, if we want tenure, we must go through a public panel when there are open vacancies, and the jury will validate certain criteria.
At my last attempt (to get tenure), the criteria was 50% "scientific" (papers, journals, projects), 30% pedagogical (teaching experience, pedagogical materials) and 20% organizational. Although I fared well in the pedagogical components, I got behind in the "scientific" one, as I only published 4/5 papers (in decent venues), 1 book (in a predatory publisher) and 1 chapter of a book (in another predatory publisher)..
The papers (which have almost no citations => no viewers) got more points than an ebook that I have about Python programming which has 3.1k stars on github (which got zero points).
Just to say that teaching scores less than number of papers..