ipunkt / laravel-analytics

Analytics tracking package for Laravel
MIT License
263 stars 54 forks source link

Auto tracking not working on Laravel Nova #58

Closed arad0s closed 4 years ago

arad0s commented 4 years ago

I'm using Laravel Nova admin panel and want to track the usage of my clients on the admin panel.

The problem is that the tracking only works for the first pageview, and doesn't work when a route changes, although the auto tracking feature is defaultly set to true.

I installed the package (version 1.x since I use Laravel 5.8), added the required env variables (ANALYTICS_PROVIDER, ANALYTICS_TRACKING_ID), published the config and added {!! Analytics::render() !!} to the html header.

I would appreciate any hints regarding what can cause this problem.

rokde commented 4 years ago

Is there any ga code in the html source on the following page requests?

arad0s commented 4 years ago

Yes, the GA code exists on all pages.

If I start on page X, and then move to page Y, I get a pageview only for page X. If I then refresh on page Y and move to page Z, I get a pageview only for page Y.

rokde commented 4 years ago

Then the problem is not in the package itself. Please look at the tracking in google analytocs what might be the problem.