cloudinary-community / cloudinary-laravel

Laravel SDK for Cloudinary
MIT License
255 stars 71 forks source link

Add custom analytics code for generated Cloudinary URLs #84

Closed colbyfayock closed 1 year ago

colbyfayock commented 1 year ago

To give the ability to track Laravel usage separate from the standard PHP usage, we'd like to add a custom Analytics ID

The Analytics token is appended at the end of Cloudinary URLs as a query parameter by the SDKs, giving us the ability to have insights as to what SDKs or tools are making Cloudinary requests.

Here's the relevant code as an example in a test from the PHP library:

https://github.com/cloudinary/cloudinary_php/blob/27187ef3992b149878ef26a69934fc72bda2fa48/tests/Unit/Asset/AnalyticsTest.php#L61

To implement, replace MockAnalytics with Analytics and set the real versions:

unicodeveloper commented 1 year ago

Fixed in 2.0.2