Giter Site home page Giter Site logo

plausible / wordpress Goto Github PK

View Code? Open in Web Editor NEW
50.0 50.0 24.0 4.96 MB

Plausible Analytics WordPress plugin

Home Page: https://plausible.io/wordpress-analytics-plugin

License: MIT License

PHP 98.20% JavaScript 1.26% CSS 0.01% Shell 0.54%
analytics plausible-analytics privacy wordpress wordpress-plugin

wordpress's Introduction

Plausible Analytics

Plausible Analytics

Simple Metrics | Lightweight Script | Privacy Focused | Open Source | Docs | Contributing

Plausible Analytics is an easy to use, lightweight (< 1 KB), open source and privacy-friendly alternative to Google Analytics. It doesn’t use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host Plausible Community Edition or have us manage Plausible Analytics for you in the cloud. Here's the live demo of our own website stats. Made and hosted in the EU 🇪🇺

We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesn’t come from the AdTech world. We are completely independent and solely funded by our subscribers.

Plausible Analytics

Why Plausible?

Here's what makes Plausible a great Google Analytics alternative and why we're trusted by 12,000+ paying subscribers to deliver their website and business insights:

  • Clutter Free: Plausible Analytics provides simple web analytics and it cuts through the noise. No layers of menus, no need for custom reports. Get all the important insights on one single page. No training necessary.
  • GDPR/CCPA/PECR compliant: Measure traffic, not individuals. No personal data or IP addresses are ever stored in our database. We don't use cookies or any other persistent identifiers. Read more about our data policy
  • Lightweight: Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is 45x smaller, making your website quicker to load. You can also send events directly to our events API.
  • Email or Slack reports: Keep an eye on your traffic with weekly and/or monthly email or Slack reports. You can also get traffic spike notifications.
  • Invite team members and share stats: You have the option to be transparent and open your web analytics to everyone. Your website stats are private by default but you can choose to make them public so anyone with your custom link can view them. You can invite team members and assign user roles too.
  • Define key goals and track conversions: Create custom events with custom dimensions to track conversions and attribution to understand and identify the trends that matter. Includes easy ways to track outbound link clicks, file downloads and 404 error pages.
  • Search keywords: Integrate your dashboard with Google Search Console to get the most accurate reporting on your search keywords.
  • SPA support: Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. We also support frameworks that use the URL hash for routing. See our documentation.
  • Smooth transition from Google Analytics: There's a realtime dashboard, entry pages report and integration with Search Console. You can track your paid campaigns and conversions. You can invite team members. You can even import your historical Google Analytics stats. Learn how to get the most out of your Plausible experience and join thousands who have already migrated from Google Analytics.

Interested to learn more? Read more on our website, learn more about the team and the goals of the project on our about page or explore the documentation.

Why is Plausible Analytics Cloud not free like Google Analytics?

Plausible Analytics is an independently owned and actively developed project. To keep the project development going, to stay in business, to continue putting effort into building a better product and to cover our costs, we need to charge a fee.

Google Analytics is free because Google has built their company and their wealth by collecting and analyzing huge amounts of personal information from web users and using these personal and behavioral insights to sell advertisements.

Plausible has no part in that business model. No personal data is being collected and analyzed either. With Plausible, you 100% own and control all of your website data. This data is not being shared with or sold to any third-parties.

We choose the subscription business model rather than the business model of surveillance capitalism. See reasons why we believe you should stop using Google Analytics on your website.

Getting started with Plausible

The easiest way to get started with Plausible Analytics is with our official managed service in the cloud. It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us.

In order to be compliant with the GDPR and the Schrems II ruling, all visitor data for our managed service in the cloud is exclusively processed on servers and cloud infrastructure owned and operated by European providers. Your website data never leaves the EU.

Our managed hosting can save a substantial amount of developer time and resources. For most sites this ends up being the best value option and the revenue goes to funding the maintenance and further development of Plausible. So you’ll be supporting open source software and getting a great service!

Can Plausible be self-hosted?

Plausible is open source web analytics and we have a free as in beer and self-hosted solution called Plausible Community Edition (CE). Here are the differences between Plausible Analytics managed hosting in the cloud and the Plausible CE:

Plausible Analytics Cloud Plausible Community Edition
Infrastructure management Easy and convenient. It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us. We manage everything so you don’t have to worry about anything and can focus on your stats. You do it all yourself. You need to get a server and you need to manage your infrastructure. You are responsible for installation, maintenance, upgrades, server capacity, uptime, backup, security, stability, consistency, loading time and so on.
Release schedule Continuously developed and improved with new features and updates multiple times per week. It's a long term release published twice per year so latest features and improvements won't be immediately available.
Premium features All features available as listed in our pricing plans. Selected premium features such as funnels and ecommerce revenue goals are not available as we aim to ensure a protective barrier around our cloud offering.
Bot filtering Advanced bot filtering for more accurate stats. Our algorithm detects and excludes non-human traffic patterns. We also exclude known bots by the User-Agent header and filter out traffic from data centers and referrer spam domains. Basic bot filtering that targets the most common non-human traffic based on the User-Agent header and referrer spam domains.
Server location All visitor data is exclusively processed on EU-owned cloud infrastructure. We keep your site data on a secure, encrypted and green energy powered server in Germany. This ensures that your site data is protected by the strict European Union data privacy laws and ensures compliance with GDPR. Your website data never leaves the EU. You have full control and can host your instance on any server in any country that you wish. Host it on a server in your basement or host it with any cloud provider wherever you want, even those that are not GDPR compliant.
Data portability You see all your site stats and metrics on our modern-looking, simple to use and fast loading dashboard. You can only see the stats aggregated in the dashboard. You can download the stats using the CSV export, stats API or tools such as the Data Studio Connector. Do you want access to the raw data? Self-hosting gives you that option. You can take the data directly from the ClickHouse database.
Premium support Real support delivered by real human beings who build and maintain Plausible. Premium support is not included. CE is community supported only.
Costs There's a cost associated with providing an analytics service so we charge a subscription fee. We choose the subscription business model rather than the business model of surveillance capitalism. Your money funds further development of Plausible. You need to pay for your server, CDN, backups and whatever other cost there is associated with running the infrastructure. You never have to pay any fees to us. Your money goes to 3rd party companies with no connection to us.

Interested in self-hosting Plausible CE on your server? Take a look at our Plausible CE installation instructions.

Plausible CE is a community supported project and there are no guarantees that you will get support from the creators of Plausible to troubleshoot your self-hosting issues. There is a community supported forum where you can ask for help.

Our only source of funding is our premium, managed service for running Plausible in the cloud.

Technology

Plausible Analytics is a standard Elixir/Phoenix application backed by a PostgreSQL database for general data and a Clickhouse database for stats. On the frontend we use TailwindCSS for styling and React to make the dashboard interactive.

Contributors

For anyone wishing to contribute to Plausible, we recommend taking a look at our contributor guide.

Feedback & Roadmap

We welcome feedback from our community. We have a public roadmap driven by the features suggested by the community members. Take a look at our feedback board. Please let us know if you have any requests and vote on open issues so we can better prioritize.

To stay up to date with all the latest news and product updates, make sure to follow us on X (formerly Twitter), LinkedIn or Mastodon.

License & Trademarks

Plausible CE is open source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can find it here.

To avoid issues with AGPL virality, we've released the JavaScript tracker which gets included on your website under the MIT license. You can find it here.

Copyright (c) 2018-present Plausible Insights OÜ. Plausible Analytics name and logo are trademarks of Plausible Insights OÜ. Please see our trademark guidelines for info on acceptable usage.

wordpress's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress's Issues

add third party plugin support to track specific events

User Story

As a user, I want some default out-of-the-box integration with popular third party plugins to support event tracking so that it will be a convenient experience for user where no configuration is required for basic event tracking

List of plugins

  1. WooCommerce
  2. Easy Digital Downloads
  3. Contact Form 7
  4. GiveWP

If you have any specific plugin to be integrated for event tracking then comment here with the plugin name and its url.

Issue with the custom domain

Had a case with the user enabling the custom domain functionality in the plugin before it's ready to use (for instance while the DNS/CNAME changes are in progress as sometimes it takes minutes while sometimes hours). Normally in our docs we ask the user never to change the code on their site until they can verify that the script is being loaded from the custom domain (yoursubdomain.yourdomain.com/js/index.js).

I wonder if there's a way to do something like this in the plugin to prevent the user enable the custom domain before it's ready to use? Or to somehow fall back to the default script if the custom domain is not ready and then switch to using the custom domain when the CNAME change is ready?

Admin settings page container breaks out of viewport on smaller screens

Hi,

I noticed that the admin settings page breaks out of the viewport on smaller screens.

I think adding a max-width to the wrapper (because its width is set to 800px) should fix it:

.plausible-analytics-wrap {
    max-width: 100%;
}

Thanks!
PS: Great work by the way, thanks for the new 'Analytics page' feature. :-)

Toggling the setting for the analytics dashboard doesn't work

I noticed that the toggle to show your analytics in the WordPress admin doesn't work as expected: toggling it does not influence whether the analytics are shown. Once the shared link is pasted, the analytics are always shown.

Screenshot 2021-04-21 at 09 22 34

There is one effect of the toggle: when no shared link is pasted, the instructions are only shown on the analytics page when the toggle is on. Otherwise, the page is there without instructions.

Plugin version 1.2.

Use with self-hosted

Hi guys,

Can this be used with self-hosted Plausible installations? I find anything in the settings page or docs.

It would be great if you could add this. No need to add it to the settings page- you could just add some wp-config.php variables we can use to specify all the fields needed to connect to a self-hosted install. If these variables are specified, the wp-admin settings page could be automatically disabled,

Track what people search for on the site

This is something we may do for all sites in the future but might be easier to do for WordPress as the WordPress site search is more standardized. Basically having a custom event called "Site Search" or something like that and sending all the different things people search for as custom props. Then site owners will have a list of keywords / topics people search for on the site. More details plausible/analytics#164

WP Dashboard not working

Hello.

When I try to get Plausible to work in WP, with the dashboard feature, I enter the shared link created from the system, click the "View your stats in your WordPress dashboard" toggle in the WP app, hit save, but the toggle does not stick, and the dashboard doesn't show.

Issues with WP Rocket

Got two reports today and both were solved by disabling WP Rocket plugin. When WP Rocket is enabled, it seems to change our script into something like this which caches the script and hosts it as a first-party connection (happens both with our WP plugin and with the manual integration):

<script data-minify="1" async defer data-domain="yourdomain.com" src="https://yourdomain.com/wp-content/cache/min/1/js/plausible.js?ver=1621435097"></script>

Is there a smart solution to cache?

Had a case where the user enabled the custom domain functionality before it was actually ready to use. And then was trying to remove the functionality without any luck. The cache plugin was installed (LiteSpeed Cache in this case) and Plausible default script only started working again when the user purged the cache. Not sure if there's a way to purge the cache by any change in our plugin or if there's any other solution to this issue that other plugins use? Basically changes in our plugin only start when you purge the cache.

Security issue and status update?

I saw the notice on the plugin page:

This plugin has been closed as of April 7, 2022 and is not available for download. This closure is temporary, pending a full review.

Then I found this thread with more details:

Our WordPress developers have already submitted a new version of the plugin to the WordPress team for review. These things will take a bit more time before the new plugin will go live. The vulnerability reported only happens if an unauthorized person has gained control over the WordPress admin panel. Otherwise, the vulnerability can’t happen.

If this causes an issue for you, please use the manual way to insert our snippet to your site while we’re fixing the plugin: https://plausible.io/docs/plausible-script. You could also use a plugin such as this one if you prefer to install Plausible using a plugin: https://wordpress.org/plugins/insert-headers-and-footers/

Thanks for your patience and sorry for the inconvenience!

It could be helpful to add a notice to the README and/or to the marketing page that is promoting the plugin.

Related: #64

Allow to put a completely custom domain

While using First party domain is efficient, I use for my non-Wordpress sites a single domain for every websites ex:

  • site1.com > stats.site-master.com
  • site2.com > stats.site-master.com
  • etc

It would be awesome to be able to customize more for the Wordpress plugin than just the subdomain name
image

Allow stats within WP for self-hosters too

Now that the latest version of Plausible self-hosted is out and it features the embedded mode we should allow self-hosters to get their stats directly in WP using the plugin too

Settings don't seem to be saved

On the brand new version, none of the optional settings seem to be working. You can enable and save options such as "View your stats in your WordPress dashboard" and it looks all fine. But nothing actually happens and when you return back to the plugin settings page, the settings you enabled previously are no longer enabled.

Analytics not showing in WP Dashboard

I've just installed the plausible plugin and insert a shared link, activated "View your stats in your WordPress dashboard.
"saved, went to dashboard/Analytics, and nothing was there. There were only two buttons on the top right. Since I assume that I'm dealing with a bug, I hit the button "report bug." Maybe I'm just too unfamiliar with the timing of the dashboard showing up; perhaps I should have given it more time after refreshing the page several times; maybe it's a bug. I don't know. It would be nice for the dashboard to show up. - I hope this info helps.

Conflict with performance optimization plugins

We regularly hear reports about our script being changed and affected by performance optimization plugins. Some example:

  • A case yesterday where our WP plugin snippet in the source code was changed automatically and is not able to track. The source code ended up looking like this. The site is using WP Rocket and Ezoic without any other plugins.

<link rel="dns-prefetch" href="//plausible.io"/>

  • Another case is Siteground Optimizer. We now have these instructions from SG on how to fix it. With SG Optimizer and our plugin, it's not possible to see any Plausible snippet in the source code and tracking doesn't work so people need to take the manual action above to fix it.

Possible solutions?

  1. Ideally we would make our plugin introduce a WordPress proxy by default for all users. That may prevent these things as there won't be any visible codes to Plausible or any third party domains anywhere so hopefully these plugins would stop "optimizing" things
  2. As an alternative, if it's possible it would be nice to do some tweak to tell other plugins not to touch our script

Update to Version 1.2.0 sets wordpress into troubleshooting mode

I've tried to update the plugin on two of my wordpress instances. First before updating from wp version 5.6.2 and then after sucessfully updating to 5.7.1. I first thought that the wp update would cause the problem, but I figured out, that the plausible plugin must be the culprit.

image

I now did a rollback from backups and will wait for a fix. Any idea how this could happen?

Wordpress dashboard quit working after new self-hosting install

I have a wordpress site w/ self-hosted Plausible. Previously the dashboard plugin was working fine.

Yesterday, I moved my Plausible install to a new VPS. Plausible itself works fine, and it correctly records and displays traffic on the site dashboard.

However my Wordpress plugin has stopped working. I created a new shared link and pasted that into the plugin, and all I see is a blank box. No other plugins have changed, so I doubt there is a conflict.

Any ideas?

edit: I created a (hidden) page on my site and used the embed code with the shared link, and it worked fine. So I'm not sure why the WP plugin doesn't work. Nothing else has changed, I just replaced the shared link w/ one from the new site. The hostname and everything else are the same.

No Plausible dashboard when WordPress is installed in subdirectory

When WP is running in a subdirectory, like with roots.io Bedrock (mydomain.com/wp/wp-admin/), Plausible WP plugin doesn't seem to be able to connect to plausible for displaying the embedded analytics.
The site code used in plausible is mydomain.com%2Fwp, but from the WordPress side this probably gets interpreted as mydomain.com/wp, which results in an 404 on plausible.

Tracking issues with WP Rocket

It seems that tracking is broken with WP Rocket and Plausible since the last update. Even with admin tracking enabled somehow the tracking code isn't visible in cached pages.

Could you please look into this issue?

Add notes that shared link should not be password protected

Adding a note that shared link should not be password protected after getting several questions on why people get error messages when trying to display stats with WP. error shows up when they create a password protected shared links so the shared link should be unprotected to work:

Copy on the main settings page:

Create a secure and private shared link in your Plausible account. Make sure the link is not password protected. See how »

Copy on the Dashboard - Analytics page:

Please click here to generate your shared link from your Plausible Analytics dashboard. Make sure the link is not password protected. Now, copy the generated shared link and paste here under Embed Analytics to view Plausible Analytics dashboard within your WordPress site.

Issue with the Photonic Lightbox plugin

"I'm using Plausible Analytics Wordpress plugin and a Photonic plugin showing Google Photos in a Lightbox malfunctions when your plugin is active. It loads the url of the picture shown in the Lightbox in the browser window instead of just showing it in the Lightbox. Can this be prevented?"

New setting: Control which user role(s) can access the analytics dashboard

In our case, we want our writers to access the analytics dashboard, so they can see how often which posts get viewed etc.

Right now, only "administrators" can access the analytics page.

Would be great if you could add a setting which allows us to control which user role(s) can access the page.

Run analytics through subfolder / proxy

Rather than instructing people to create a custom domain / CNAME we could run the analytics through a proxy directly using the WordPress plugin. Would be an easier way to get started and very effective in terms of not being blocked by adblockers

add support for custom events tracking

User Story

As a user, I want to track custom events in my WordPress website so that I can utilize to see my marketing efforts using Plausible Analytics.

Note: Currently, we will go ahead with basic support for WordPress and WooCommerce.

Acceptance Criteria

  • Add the custom event tracking snippet

add support for 404 error pages tracking

we now have automated 404 error pages tracking but users need to take two additional steps:

  • create 404 goal inside their Plausible account
  • add this line of code to their 404.php WordPress template:

<script>plausible("404",{ props: { path: document.location.pathname } });</script>

full instructions here: https://docs.plausible.io/404-error-pages-tracking

is it possible to support this in the WordPress plugin too?

Individual post stats link in the toolbar

"have y’all considered putting a link to a page’s given analytics to the toolbar in your WordPress plugin? I think it would make the plugin much more useful to many WordPress folks. I find myself looking at individual posts’ stats so it’s quite a workflow to get there."

(feedback via twitter)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.