ggendre / GALocalStorage

A google analytics version that works with localstorage instead of cookies for webviews usage (deprecated)
114 stars 46 forks source link

How to use it with angular js? #28

Closed kingkarki closed 8 years ago

kingkarki commented 8 years ago

I m using ionic framework. Can i use it like ga_storage._trackPageview('/index', 'optional title'); or i have to use it like $window.ga_storage._trackPageview('/index', 'optional title');

ggendre commented 8 years ago

Both will work. $window is just a reference to the window object

If you want to realy use it "the angular way" you should do a small Service or Factory around ga_storage.