Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Releases: devarts/plausible-php

v4.0.1

Choose a tag to compare

@marko-ogg marko-ogg released this 21 Jul 21:30
d204c8c

What's Changed

  • Add missing name property definition to BreakdownItem by @marko-ogg in #9

Full Changelog: v4.0.0...v4.0.1

v4.0.0

Choose a tag to compare

@marko-ogg marko-ogg released this 21 Jul 11:59

🏗️ Architecture Changes

  • Introduced Devarts\PlausiblePHP\Contract\ConfigurationInterface and Devarts\PlausiblePHP\Contract\ConfigurationInterface\Configuration as it's implementation. This object provides client to be used for Plausible API communication, and accepts configuration parameters like API key and API base URI.

  • Introduced separate classes for different Plausible APIs in Devarts\PlausiblePHP\Api namespace:

    • StatsApi - works with Plausible Stats API (docs).
    • EventsApi - works with Plausible Events API (docs).
    • SitesApi - works with Plausible Sites API (docs).
  • ❗ Renamed Devarts\PlausiblePHP\PlausibleAPI to PlausibleApi. This class also now accepts object of ConfigurationInterface type in it's constructor. It's purpose is changed, as it now serves as a provider of different Plausible APIs. It implements Devarts\PlausiblePHP\Contract\PlausibleApiInterface.

  • Introduced new namespace Devarts\PlausiblePHP\Contract that holds interfaces that are self-explanatory:

    • ApiResponseObject
    • ConfigurationInterface
    • EventsApiInterface
    • SitesApiInterface
    • StatsApiInterface
    • PlausibleApiInterface

🆕 New Features

  • Added support for properties event:goal and event:hostname (see properties)
  • Added support for new metrics: conversion_rate, time_on_page and views_per_visit (see metrics)
  • Added support for Sites List API: https://plausible.io/docs/sites-api#get-apiv1sites
  • Added support for Goals List API: https://plausible.io/docs/sites-api#get-apiv1sitesgoals
  • Added normalisation for Devarts\PlausiblePHP\Support\Metric and Devarts\PlausiblePHP\Support\Filter objects passed as arguments to different methods of Devarts\PlausiblePHP\Api\StatsApi, which means if you pass raw objects they will automatically be converted to string representation.

❗Other Important Changes

  • ❗ Dropped support for providing base API URI with v1 paths. Following URI is not valid base path anymore: https://plausible.io/api/v1/
  • ❗ Dropped support for PHP 7.4

⏫ Upgrade Guide

  1. Update Devarts\PlausiblePHP\PlausibleAPI construction:
    • (optional) Rename class from PlausibleAPI to PlausibleApi
    • Pass instance of ConfigurationInterface to the constructor (e.g. Devarts\PlausiblePHP\Configuration::create('api_key'))
  2. Update API methods calls:
    • For each method previously called on Devarts\PlausiblePHP\PlausibleAPI objects, add corresponding proxy call. For example, if you previously called $plausible_api->getAggregate(...) you should now call $plausible_api->stats()->getAggregate(...)
  3. Make sure to tweak base URI when passing to Devarts\PlausiblePHP\Configuration::create to not contain v1/ suffix

v3.3.0

Choose a tag to compare

@marko-ogg marko-ogg released this 13 Jul 17:25
7cdd84a

What's Changed

  • Implement ability to record events using the Plausible events API by @ramsey in #7

New Contributors

  • @ramsey made their first contribution in #7

Full Changelog: v3.2.0...v3.3.0

v3.2.0

Choose a tag to compare

@marko-ogg marko-ogg released this 22 Feb 10:58
75b7c73

What's Changed

Full Changelog: v3.1.0...v3.2.0

v3.1.0

Choose a tag to compare

@marko-ogg marko-ogg released this 04 Feb 18:43
1aafd06

What's Changed

New Contributors

Full Changelog: v3.0.0...v3.1.0

Support custom event property filter, with additional usage improvements

Choose a tag to compare

@marko-ogg marko-ogg released this 26 Dec 11:33
046d542

Changes:

  • Dropped checks for supported metrics and filters in Devarts\PlausiblePHP\Support\Metric::add and Devarts\PlausiblePHP\Support\Filter::add methods, allowing users to add any metric or filter.
  • Added methods to Devarts\PlausiblePHP\Support\Metric and Devarts\PlausiblePHP\Support\Filter to simplify adding metrics and filters (e.g. addEventName, addVisitors...).
  • Implemented method to add custom event property Devarts\PlausiblePHP\Support\Filter::addEventCustomProperty.

Backward incompatible change:

  • Dropped constants Devarts\PlausiblePHP\Support\Metric::SUPPORTED_METRICS and Devarts\PlausiblePHP\Support\Property::SUPPORTED_PROPERTIES.

Changed library namespace

Choose a tag to compare

@marko-ogg marko-ogg released this 11 Sep 22:56
  • Changed library namespace from Plausible to Devarts\PlausiblePHP.

Fix "dynamic properties are deprecated" error when using PHP 8.2

Choose a tag to compare

@marko-ogg marko-ogg released this 11 Sep 19:42
v1.0.4

Drop phpunit 7 version from require-dev

Fix broken PlausibleAPI::deleteGoal method

Choose a tag to compare

@marko-ogg marko-ogg released this 11 Sep 17:44
v1.0.3

Cast goal ID to string when passing to urlencode

Expand Guzzle version requirements

Choose a tag to compare

@marko-ogg marko-ogg released this 11 Sep 10:31
v1.0.2

Merge branch 'master' of github.com:devarts/plausible-php