Skip to content

Releases: aawnu/php-ga4

V1.1.1: GDPR Notice

16 Feb 22:04
2a2163a

Choose a tag to compare

This update does not modify any code as it merely adds GDPR Notice to the README.

Full Changelog: v1.1.0...1.1.1

V1.1.0: PHP 8

09 Feb 23:31
737d07d

Choose a tag to compare

This release will update supported version to PHP 8+ and apply stricter types on stuff without workarounds or exceptions.

NOTE: If you are on PHP 7<8 then update composer to 1.0.* as version to ensure keeping PHP 7+ supported versions.

What's Changed

  • Enable debug mode for individual events on live by @aawnu in #25
  • Move support up to PHP 8+ by @aawnu in #27

Full Changelog: v1.0.10...v1.1.0

V1.0.10

19 Nov 21:30
95037b8

Choose a tag to compare

What's Changed

  • Update README and remove unwanted dump by @aawnu in #23

Full Changelog: v1.0.9...v1.0.10

V1.0.9: Autoparsing

19 Nov 19:17
a97aa9c

Choose a tag to compare

Add import from array to event or item, making it possible to prebuild events on frontend before passing to backend.

axios.post('/api/ga4', {
    addToCart: {
        currency: 'EUR',
        value: 13.37,
        items: [
            {
                'item_id': 1,
                'item_name': 'Cup',
                'price': 13.37,
                'quantity': 1
            }
        ]
    }
})
use AlexWestergaard\PhpGa4\Analytics;
use AlexWestergaard\PhpGa4\Event;

$addToCart = Event\AddToCart::fromArray($_POST['addToCart']);

Analytics::new($measurementId, $apiSecret)->addEvent($addToCart)->post();

What's Changed

  • Add static fromArray() method to Events and Items by @aawnu in #22

Full Changelog: v1.0.8...v1.0.9

V1.0.8: Accept 204 Responses

03 Nov 15:08

Choose a tag to compare

  • Allow responses without a body (Response 204)
  • Allow decimal numbers for tax and shipment values
  • Update composer links to fit GitHub account renaming

What's Changed

  • Production gives HTTP 204 (no content) on a successful post by @jordykouters in #18
  • The fields "shipping" and "tax" can both be float values by @jordykouters in #19

New Contributors

Full Changelog: v1.0.7...v1.0.8

V1.0.7

30 Aug 19:00

Choose a tag to compare

This update has no functional changes. It's purely to improve information and Packagist

Full Changelog: v1.0.6...v1.0.7

V1.0.6: Separate Full/Partial Refunds

30 Aug 10:07
01b4bbb

Choose a tag to compare

  • Added isFullRefund scope to Refund to help determine if Items is a required parameter.

What's Changed

  • Add separator between Refund and Partial Refund by @AlexWestergaard in #17

Full Changelog: v1.0.5...v1.0.6

V1.0.5: Skip Too Large Requests

28 Aug 02:11
102749d

Choose a tag to compare

Minor fixup of Analytics::toArray() and skipping post-requests too large (exceeds 130kb body size).

Please refer to the previous release for more details about the last modifications.

V1.0.4: Improved Exceptions

28 Aug 01:50
d04a112

Choose a tag to compare

This update refactors the exception flow of the code in a cleaner and simpler-to-understand way.

The reason for this update is to avoid throwing midways through a process happening on multiple layers, for example $event->toArray()->parent::toArray(). It is also preferable to avoid throwing exceptions when iterating through multiple post-calls due to multiple Event stacks (Each post-call can contain a maximum of 25 events).

Please use the $debug parameter when initializing the Analytics class while configuring your code and events. Just bear in mind that Google Analytics Debug endpoint will only point to direct constraints to their structure and not the data itself.

What's Changed

  • Update Exception Handling by @AlexWestergaard in #15

Full Changelog: v1.0.3...v1.0.4

V1.0.3: Large Number Visualisation

25 Aug 09:25

Choose a tag to compare

  • Updated intval("1_000_000") to intval(strtr("1_000_000", ["_" => ""]) so PHP converts it to 1,000,000 instead of 1

Full Changelog: v1.0.2...v1.0.3