PHPackages                             pixelopen/magento-plausible - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pixelopen/magento-plausible

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

pixelopen/magento-plausible
===========================

Add Plausible Analytics to Magento

100.3.0(2y ago)103.6k↑75%1[1 issues](https://github.com/Pixel-Open/magento-plausible/issues)PHPPHP ^8

Since Apr 13Pushed 2y ago3 watchersCompare

[ Source](https://github.com/Pixel-Open/magento-plausible)[ Packagist](https://packagist.org/packages/pixelopen/magento-plausible)[ RSS](/packages/pixelopen-magento-plausible/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)Dependencies (8)Versions (7)Used By (0)

Magento Plausible
=================

[](#magento-plausible)

[![Minimum PHP Version](https://camo.githubusercontent.com/fb4bde121c9282bd76e5cb29b2b9d9fb5803649c1030a746ea77fc5630e78d79/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d677265656e)](https://php.net/)[![Minimum Magento Version](https://camo.githubusercontent.com/4f1152f6fd3edddf6002af0689740bada090d1933458860034c72b8c32ba05a0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6167656e746f2d253345253344253230322e342e342d677265656e)](https://business.adobe.com/products/magento/magento-commerce.html)[![GitHub release](https://camo.githubusercontent.com/817c091b90520a4db72659457c5e415a277979f994c2370e0a14032b455b0e7c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f506978656c2d4f70656e2f6d6167656e746f2d706c61757369626c65)](https://github.com/Pixel-Open/magento-plausible/releases)[![Quality Gate Status](https://camo.githubusercontent.com/63e92649cd220a7f10d80bcea997684dc128ffe95f8f8bf96490d358103f649d/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d506978656c2d4f70656e5f6d6167656e746f2d706c61757369626c65266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/summary/new_code?id=Pixel-Open_magento-plausible)

Presentation
------------

[](#presentation)

Add Plausible Analytics to Magento.

- Save visited pages
- Access Analytics in Magento Admin with Plausible Shared Link
- Manage goals on specific actions (contact, register, checkout, order...)
- Allow use of your own Plausible instance
- Compatible with multiple websites
- Compatible with Magento OpenSource, Mage-OS and Adobe Commerce
- Compatible with Hyvä theme

[![Plausible Analytics in Magento admin](screenshot.png)](screenshot.png)

Requirements
------------

[](#requirements)

- Magento &gt;= 2.4.4
- PHP &gt;= 8.0.0

Installation
------------

[](#installation)

```
composer require pixelopen/magento-plausible

```

Configuration
-------------

[](#configuration)

*Stores &gt; Configuration &gt; Services &gt; Plausible*

### Tracking

[](#tracking)

OptionDescriptionEnabledAdd tracking script on frontend and start recording visited pages.Instance URLPlausible instance URL. Allow to use a custom domain for dedicated instance.**Note:** For custom domain with Magento CSP Module, remember to add your instance URL in CSP whitelist for *frame-src*, *connect-src* and *script-src*.

### Admin

[](#admin)

OptionDescriptionEnabledDisplay stats in the "Marketing &gt; Plausible &gt; Analytics" menu (refresh cache when option is updated).Shared LinkCreate the shared link in your Plausible instance site settings: Visibility &gt; Shared links &gt; + New link### Goals

[](#goals)

The module includes goal events when enabled in module configuration.

- Contact message sent
- Account registration
- Customer has logged in
- Cart view
- Checkout
- Order complete

OptionDescriptionEnabledAllow to track actions.Goal ContactPlausible goal name when customer send a contact message. Leave empty to ignore.Goal RegisterPlausible goal name when creating the customer account. Leave empty to ignore.Goal LoginPlausible goal name when customer was connected. Leave empty to ignore.Goal CartPlausible goal name when customer goes to the cart. Leave empty to ignore.Goal CheckoutPlausible goal when customer access the checkout. Leave empty to ignore.Goal OrderPlausible goal name when customer completes an order. Leave empty to ignore.Goal ProductPlausible goal name when customer visits a product page. Leave empty to ignore.Goal CategoryPlausible goal name when customer visits a category page. Leave empty to ignore.You need to add goal events in your Plausible website configuration:

[![Plausible Goals](goals.png)](goals.png)

The Plausible goal name must be the same as the name in the module configuration.

Default goal names are:

- contact
- register
- login
- cart
- checkout
- order

### Revenue Tracking

[](#revenue-tracking)

With the goal "order", the "revenue tracking" is sent. This feature is only available with Plausible business plan.

When you add the "order" goal, you need to enable the "Revenue Tracking":

[![Plausible Revenue Tracking](revenue.png)](revenue.png)

### Custom Goal

[](#custom-goal)

In a module, declare the new goals in the `config.xml` file:

```

                page_view_goal
                form_post_goal

```

From anywhere (like a controller action), add a new Plausible goal:

```
