Skip to content

Commit

Permalink
Support client hints
Browse files Browse the repository at this point in the history
  • Loading branch information
zepfietje committed Sep 22, 2023
1 parent 0a0eef5 commit 374532b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [0.4.8] - 2023-09-22

### Added

- Support client hints.

## [0.4.7] - 2023-08-02

### Changed
Expand Down Expand Up @@ -110,6 +116,7 @@

- TrackPageview middleware.

[0.4.8]: https://github.com/pirsch-analytics/laravel-pirsch/releases/tag/0.4.8
[0.4.7]: https://github.com/pirsch-analytics/laravel-pirsch/releases/tag/0.4.7
[0.4.6]: https://github.com/pirsch-analytics/laravel-pirsch/releases/tag/0.4.6
[0.4.5]: https://github.com/pirsch-analytics/laravel-pirsch/releases/tag/0.4.5
Expand Down
6 changes: 6 additions & 0 deletions src/Pirsch.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ public static function track(
'ip' => request()->ip(),
'user_agent' => request()->userAgent(),
'accept_language' => request()->header('Accept-Language'),
'sec_ch_ua' => request()->header('Sec-CH-UA'),
'sec_ch_ua_mobile' => request()->header('Sec-CH-UA-Mobile'),
'sec_ch_ua_platform' => request()->header('Sec-CH-UA-Platform'),
'sec_ch_ua_platform_version' => request()->header('Sec-CH-UA-Platform-Version'),
'sec_ch_width' => request()->header('Sec-CH-Width'),
'sec_ch_viewport_width' => request()->header('Sec-CH-Viewport-Width'),
'referrer' => request()->header('Referer'),
...$name === null
? []
Expand Down

0 comments on commit 374532b

Please sign in to comment.