Replies: 3 comments 4 replies
-
Try to doing this: use Analytics; Instead of this: use Spatie\Analytics\Analytics; If that returns error saying "The use statement with non-compound name 'Analytics' has no effect", then no need to import ANALYTICS. Try removing or commenting that line. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Try (new Spatie\Analytics\Analytics())->fetchVisitorsAndPageViews() |
Beta Was this translation helpful? Give feedback.
2 replies
-
For use this package first of you need to add into
And only after you can use
OR
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've searched high and low on the internet but can't find an answer to this.
I have added Spatie Analytics but when I add this to my controller:
I get the following error:
Non-static method Spatie\Analytics\Analytics::fetchVisitorsAndPageViews() cannot be called statically
Where am I going wrong? I can't find anything in the documentation about the error or how to rectify it.
Beta Was this translation helpful? Give feedback.
All reactions