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:

  1. a link appears in browser as sub.f.org/fff/sign-up/plan
  2. the link changes immediately to add #: sub.f.org/#/fff/sign-up/plan
  3. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.