Open codalprashant opened 6 years ago
Hi,
This is due to ui-router update, check this: https://ui-router.github.io/ng1/docs/latest/modules/ng1_state_events.html
I managed it using AnalyticsProvider.setPageEvent('$stateChangeStart')
in config and
$rootScope.$on('$stateChangeStart',
function(event, toState) {
Analytics.trackPage($location.absUrl());
});
in run section.
Can we close this issue ?
@revolunet No! You need to fix it in your code
AnalyticsProvider.setPageEvent('$stateChangeSuccess');
is now deprecated in angular-ui-router and need to be replaced in your code
@revolunet @Sparksx I agree that this should be fixed in the library, and not with a workaround.
so someone should issue a pull request please, i dont use angular anymore sorry
@justinsa is now the main contributor
My opinion is that the library should stop having an opinion on the route provider used and let the implementer handle that decision. We could then provide a Cookbook as part of the Wiki or the README to explain how to configure different route providers for auto-page tracking or this setPageEvent issue. This library should do Google Analytics the best it can and not need updating due to ng-router or ui-router changes.
If someone wants to issue a PR to fix this issue, great, if not, I will likely make a major version change to alleviate this possibility from being able to happen.
It is just tracking the first page. But when the state is changed, it stops tracking the pages and the active user.