kremalicious / gatsby-plugin-matomo Goto Github PK
View Code? Open in Web Editor NEWπ₯ Gatsby plugin to add Matomo (formerly Piwik) onto a site.
Home Page: https://kremalicious.com/gatsby-plugin-matomo
License: MIT License
π₯ Gatsby plugin to add Matomo (formerly Piwik) onto a site.
Home Page: https://kremalicious.com/gatsby-plugin-matomo
License: MIT License
Verify if a component for link tracking (outlines & downloads) is needed. If so, provide component similar to https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-google-analytics/src/index.js#L4
Currently, every page load is preceded by a JavaScript event in Matomo. So even if a user visits just one page, two events are recorded. This is a severe issue, as it eliminates all bounces. A bounce has just a single action. Because there is no single action, there are no bounces, which falsifies all statistics.
I see in your docs, that there is an option "trackLoad", but it doesn't seem to be implemented. Maybe you meant to use:
if (first && trackLoad) {
}
on line 56 of your gatsby-browser.js file.
In my opinion, the load tracking event should be removed completely.
Hey there.
This is a tall ask, so feel free to close the issue if you're not sure, but I'm hopeful that someone else may have experienced this issue & knows a remedy or understands why there is a discrepancy.
Since migrating our site to Gatsby & using this plugin, we've experienced significant shifts in traffic attribution by channel (despite overall visits remaining flat). We've seen sharp drops in SEO & referral traffic with a corresponding spike in Direct Entry.
Here's a view of SEO vs. Direct Entry:
Here's a view of website referrals vs. Direct Entry:
Does anyone have any ideas on why this plugin results in decreased channel attribution? You can view our configuration for the plugin here.
Thanks in advance!
When navigating, the page title is not correctly set in Matomo, the pathname
is sent instead.
I'm using React Helmet to set my title, so the question is: is the title already updated when onRouteUpdate
is called? If yes, maybe we could get the document title and it should be good for every usecase.
Hi,
The following code of this plugin is based on code from gatsby-plugin-google-analytics
:
// Minimum delay for reactHelmet's requestAnimationFrame
const delay = Math.max(32, 0)
setTimeout(sendPageView, delay)
In browsers with a refresh rate higher than 60, this can lead to a bug (where the wrong title is sent).
You can find more information in the issue I have created for gatsby-plugin-google-analytics
:
10.0.7
to 10.0.8
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
release-it is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Currently the plugin doesn't officially support Gatsby 4 (even though everything seems to work). I suppose the dependency range just needs to be updated?
warn Plugin gatsby-plugin-matomo is not compatible with your gatsby version 4.0.0 - It requires gatsby@^2.0.0 || ^3.0.0
Hi,
we are using gatsby 5 with this cool matomo plugin in cookieless mode. We got the requirement to offer the opt-out tracking functionality in our privacy statement. (https://matomo.org/faq/general/faq_20000/)
I guess with a workaround using the requireConsent option it is possible to implement it. But my question is: Is there a better way to provide the opt out functionality?
Julian Schregle [email protected], Mercedes-Benz Tech Innovation GmbH, legal info/Impressum
Hey there,
I'm using gatsby-plugin-matomo 0.8.3 and it's working perfectly (thanks!) for regular navigation on the page. The page also offers downloads (linked to static files) like this:
<a href="/static/somefile.zip" download="">Download</a>
Unfortunately, the downloads are not shown in the Matomo dashboard. Is there anything else to setup to get this working?
Thanks!
Implement user consent mode, see https://developer.matomo.org/guides/tracking-javascript-guide#asking-for-consent
Most minimal implementation would be to add the requireConsent
check for all tracking, and allow to activate it via plugin option. Implementing the consent flow would be then left to plugin user.
Hey there! I'm curious - does this plugin support custom events?
https://developer.matomo.org/guides/tracking-javascript-guide#manually-trigger-events
I'm envisioning something similar to the function offered by the Gatsby GA plugin:
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-google-analytics/src/index.js#L80
I looked through the code & didn't find anything. Is there something I'm missing? If not, consider this an enhancement request π
Thanks!
No sure if this is an issue with this plugin, Matomo or Gatsby, but here goes...
We've moved the build into our non-prod environment (AWS S3 with CloudFront) and it works fine happily sending data over to Matomo, until... it decides that all routes are 404.
The issue was only noticed after we implemented this Matomo plugin.
On closer inspection, the only difference between the site working and not working, is when the cookie "_pk_ref.1.546b" gets set.
Removing this cookie fixes the issue.
Thanks
Hi,
This plugin looks very nice. One thing that I don't like, however, is that it forces plugin users to honor Do-Not-Track (DNT).
I believe website owners have the right to ask visitors for consent to track them, and that such an explicit consent overrules any DNT setting. Currently, this plugin doesn't allow users to do this, however.
Even if you are not willing to give plugin users the choice whether they honor DNT or not β at least there should be an option to collect anonymous data (I'm new to Matomo, but it seems, it is possible to collect anonymous data).
Anonymous data are no personal or personally identifiable information, so they don't fall under any privacy law (as far as I know).
Hey,
I'm using gatsby-plugin-matomo and it's working perfectly.
do you think it would be possible that the exclude option could be a regex? for example to exclude everything that starts with a path or everything that does not start with a path ?
Thanks!
The following code results in an event being tracked for every visit to a website or app:
gatsby-plugin-matomo/src/gatsby-browser.js
Lines 51 to 59 in b99a9a6
Unfortunately with the javascript load duration event being tracked in Matomo, the "Actions in visit" are more than one and causes all of these visits to no longer count as "Bounced" even if the visitor didn't interact with the page and left without taking any further action. This can heavily skew the reports in Matomo by not accurately showing the actual bounce rate of visitors to a website or web page.
Matomo 4 includes advanced Page Performance reporting which may make these javascript load duration events no longer necessary: https://matomo.org/faq/how-to/how-do-i-see-page-performance-reports/
Hi,
i installed your plugin and can't get it work.
No matter production or dev-mode.
More Info:
1
,https://xxxxxxx
,https://www.xxxxxx.xx
,/piwik.js
, <<< also testedI hope you can find time to help.
Best regards
Hey there!
Could you please add support for error tracking?
https://matomo.org/faq/how-to/how-do-i-enable-basic-javascript-error-tracking-and-reporting-in-matomo-browser-console-error-messages/
I think ideally it would just be an additional boolean option, e.g. enableErrorTracking
:
https://github.com/kremalicious/gatsby-plugin-matomo#options
If enableErrorTracking
is true
, we could add _paq.push(['enableJSErrorTracking']);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.