Mobile app version of vmapp.org
Login or Join
Angie530

: How to handle AngularJS hash bounce in Google Anlaytics? Google Analytics append string is stripped off due to angular hash (#) bounce. when you click on it this link sub.f.org/fff/sign-up/plan,

@Angie530

Posted in: #GoogleAnalytics #Javascript

Google Analytics append string is stripped off due to angular hash (#) bounce.

when you click on it this link sub.f.org/fff/sign-up/plan, the following actions occurs:


a link appears in browser as sub.f.org/fff/sign-up/plan
the link changes immediately to add #: sub.f.org/#/fff/sign-up/plan
the link returns to original state sub.f.org/fff/sign-up/plan


This action is almost like a redirect, which is why the GA append string is stripped.

I am using angular 1.3 and ngRoute angular module for routing (inherting code from developer worked before me, I am no expert on angular) and using $locationProvider.html5Mode(true); which causes the # to hide.

This breaks google analytics. I do not wish to use other available ngAnalytics or other modules. I wish to have solution within the angular environment.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Angie530

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme