Releases: aawnu/php-ga4
V1.1.1: GDPR Notice
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
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
V1.0.9: Autoparsing
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
Full Changelog: v1.0.8...v1.0.9
V1.0.8: Accept 204 Responses
- 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
- @jordykouters made their first contribution at #18
Full Changelog: v1.0.7...v1.0.8
V1.0.7
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
- Added
isFullRefundscope toRefundto help determine ifItemsis 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
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
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
- Updated
intval("1_000_000")tointval(strtr("1_000_000", ["_" => ""])so PHP converts it to1,000,000instead of1
Full Changelog: v1.0.2...v1.0.3