revolunet / angular-google-analytics

Google Analytics tracking for your AngularJS apps
MIT License
652 stars 172 forks source link

Asyncronous callback after trackPage/trackEvent #155

Open lucianomurr opened 8 years ago

lucianomurr commented 8 years ago

Hi everyone, exists a way to set a callback function after the trackPage/trackEvent?

L.

Toxantron commented 8 years ago

No. What would be the use case for this? Could you elaborate little on your requirements?

lucianomurr commented 8 years ago

Yes, we have a page with redirect to the other app, and we would monitoring this event.

myFunctionRedirect(){
 Analytics.trackEvent('button', 'click', 'newPageRedirect');
 window.location.href = 'urlOtherApp';
}

The redirect after the trackEvent remove the previous call to the analytics service of the current page.