tighten / nova-google-analytics

Google Analytics integration with Laravel Nova
MIT License
165 stars 30 forks source link

[Request]: ability to see analytics for multiple domains #15

Closed swapnilsarwe closed 1 year ago

swapnilsarwe commented 4 years ago

Hello @mattstauffer ,

Need your opinion on this. Does it seem OK to have support for analytics data for multiple domains on Nova Dashboard.

Its very specific use case, i doubt it if even spatie's, laravel-analytics would be able to support it. Since its not in that package's scope.

Since its very specific, I guess creating a new repo with this support would be needed, will require work like having mutliple ANALYTICS_VIEW_ID and multiple credential.json to be stored.

Any thoughts?

elijahworkz commented 4 years ago

@swapnilsarwe you don't need multiple credential.json files. In GA you just need to add same user to all the sites you need.

For the rest - laravel-analytics is fine for what you want. You just need to create a custom way to store and retrieve the view IDs and build your own cards.

d8vjork commented 4 years ago

This will be great and a must-have for some of my projects

krievley commented 3 years ago

I looked into this more today. Currently we are utilizing spatie's laravel-analytics package to create the connection to Google Analytics. At this time, the AnalyticsServiceProvider in this package builds the connection based on it's published analytics.php config file. It takes the .env argument for ANALYTICS_VIEW_ID= as well as the uploaded service-account-credentials.json to construct the values for the config and throws an error if either of these items are missing.

To complete this request, we will need to build a new ServiceProvider that replaces the one provided by the laravel-analytics package. Stay Tuned! 😄

pmreyes commented 2 years ago

Hi @krievley looking forward to this as we are also planning the same implementation of saving the view_id inside our nova-settings table.

Great package! Lots of cool stuff in it that saves us a lot of time.

Would this soon also support GA4? Not sure though how that's going to turn out since GA4 doesn't have view IDs.