Download the PHP package octfx/plausible without Composer

On this page you can find all versions of the php package octfx/plausible. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package plausible

Plausible Analytics

Plausible Analytics is a simple, 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.

See https://github.com/plausible/analytics

Installation

Configuration

Key Description Example Default
$wgPlausibleDomain Plausible Domain. Required https://plausible.io null
$wgPlausibleDomainKey Domain Key set on the plausible website. Required plausible.io null
$wgPlausibleApiKey Auth Bearer key for integration with Extension:PageViewInfo
$wgPlausibleHonorDNT Honor the Do Not Track header and disable tracking. false true
$wgPlausibleTrackOutboundLinks Enable Tracking of outbound link clicks. true false
$wgPlausibleTrackFileDownloads Enable Tracking of link clicks that lead to files, sending a File Download event. See the official docs. true false
$wgPlausibleTrackFileDownloadExtensions List of additional file extensions to track. See the official docs. ['js', 'py'] []
$wgPlausibleTrackLoggedIn Enable Tracking for logged in users. true false
$wgPlausibleEnableTaggedEvents Enable click tracking via css classes. See the official docs. true false
$wgPlausibleIgnoredTitles List of page titles that should not be tracked. Examples. ['/Page1', '/Special:*', ] []
$wgPlausibleEnableOptOutTag Enables or disables the <plausible-opt-out /> tag that allows users to opt-out from being tracked. false true

Included tracking scripts

The following tracking modules can be activated by setting the provided configuration key in LocalSettings.php to true.

Key Description Event Name
$wgPlausibleTrack404 Sends a 404 event for unknown titles. 404
$wgPlausibleTrackSearchInput Send inputs to #searchInput to plausible as a custom event named Search: Input. Search: Input
$wgPlausibleTrackEditButtonClicks Track clicks to #ca-edit a as a custom event named Edit Button: Click. Edit Button: Click
$wgPlausibleTrackNavplateClicks Track clicks to links inside .navplate elements. Navplate: Click
$wgPlausibleTrackInfoboxClicks Track clicks to links inside .mw-capiunto-infobox and .infobox elements. Infobox: Click
$wgPlausibleTrackCitizenSearchLinks Only for Skin:Citizen. Track clicks to search result links found in #typeahead-suggestions. Event is named Citizen: Search Link Click. Citizen: Search Link Click
$wgPlausibleTrackCitizenMenuLinks Only for Skin:Citizen. Track clicks to links in the sidebar menu. Event is named Citizen: Menu Link Click. Citizen: Menu Link Click

Server Side Tracking

Some events can be sent serverside without having to rely on the included plausible client script.

The following custom events can be activated:

Event / Goal Names

This extension chooses the following convention for naming events / goals: Subject: Event/Action.

Tracking Custom Events

https://github.com/plausible/docs/blob/master/docs/custom-event-goals.md

If you want to track custom event goals like button clicks or form completions, you have to trigger these custom events from your website using JavaScript.

Scripts need to be placed in MediaWiki:<Your Skin>.js e.g. MediaWiki:Citizen.js.

Example: Tracking edit button clicks on Skin:Citizen.

Via css classes

With setting $wgPlausibleEnableTaggedEvents = true; click to elements can be tracked by setting css classes. From the official docs:

You can also add class names directly in HTML If you can edit the raw HTML code of the element you want to track, you can also add the classes directly in HTML. For example:

Or if your element already has a class attribute, just separate the new ones with a space:

When you send custom events to Plausible, they won't show up in your dashboard automatically. You'll have to configure the goal for the conversion numbers to show up.

Ignoring Pages

https://github.com/plausible/docs/blob/master/docs/excluding-pages.md#common-use-cases-and-examples

By default, Plausible Analytics tracks every page you install the snippet on. If you don't want Plausible to track specific pages, do not include the snippet on those pages.

Common use cases and examples

$wgPlausibleIgnoredTitles input Prevents tracking on pages with a URL path of:
/blog4 /blog4 and exactly /blog4 with nothing before or after it, so not /blog45 nor /blog4/new nor /blog
/rule/* /rule/<anything>, with <anything> being any set of characters (length >=0), but not a forward slash - for example, both /rule/1 as well as /rule/general-rule-14, but not /rule/4/details nor /rules
/how-to-* /how-to-<anything> - for example, /how-to-play or /how-to-succeed, but not how-to-/blog
/*/admin /<anything>/admin - for example, /sites/admin, but not /sites/admin/page-2 nor /sites/2/admin nor /admin
/*/priv/* /<anything>/priv/<anything> - for example, /admin/priv/sites, but not /priv nor /priv/page nor /admin/priv
/rule/*/* /rule/<anything>/<anything> - for example, /rule/4/new/ or /rule/10/edit, but not /rule nor /rule/10/new/save
/wp/** /wp<anything, even slashes> - for example, /wp/assets/subdirectory/another/image.png or /wp/admin, and everything in between, but not /page/wp

Lua Integration

With Extension:PageViewInfo active, plausible exposes the following functions:

  1. mw.ext.plausible.topPages() Returns the top pages and the views for the last day. The table is ordered by the number of page views, and can be iterated by using ipairs.
    Example:

Alternatively this function can be called with the number of days to calculate the views over, e.g. mw.ext.plausible.topPages( 30 ).
This is expensive as no caching is employed.

  1. mw.ext.plausible.pageData( titles, days ) Returns the page views for the given titles over the last N days.
    Example:

  2. mw.ext.plausible.siteData( days ) Returns the site views for the given last N days.
    Example:

All versions of plausible with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
composer/installers Version >=1.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package octfx/plausible contains the following files

Loading the files please wait ....