theiconic / php-ga-measurement-protocol

Send data to Google Analytics from the server using PHP. Implements GA measurement protocol.
MIT License
655 stars 135 forks source link

Change `sendHit()` from `private` to `protected` method #38

Closed khalwat closed 7 years ago

khalwat commented 7 years ago

First of all, thanks again for your fantastic library.

I've found the need to subclass use \TheIconic\Tracking\GoogleAnalytics\Analytics; so that I can do some additional business logic specific to my use-case, and also to extend the sendHit() method as a bottleneck to determine whether to send the analytics data or not.

There's one rub, however: because the method is declared as private I can't override it. I could fork the project, but I'd like to keep it in sync with the work you're doing.

So is there any chance you could change the private methods to protected to allow the type of thing?

jorgeborges commented 7 years ago

Done in latest release, you may run composer update @khalwat

khalwat commented 7 years ago

You are the best, thank you!