Comments (17)
Hey,
Order shouldn't matter for that :S. That's weird.
And that shouldn't have anything to do with angularytics
I mean, the problem should come from config
and run
usage.
What error are you getting? What's going on otherwise? have you tried changing versions?
Thanks for the report!
from angularytics.
Hi,
I was getting circular dependencies as an error. Also comment/code was to show how to incorporate this code in a pre-existing app. No, I have not tried changing versions of angularytics.
Thanks,
J
From: Martin Gontovnikas [mailto:[email protected]]
Sent: Tuesday, August 13, 2013 2:25 PM
To: mgonto/angularytics
Cc: John R. Tomaselli
Subject: Re: [angularytics] Setup with existing application (#10)
Hey,
Order shouldn't matter for that :S. That's weird.
And that shouldn't have anything to do with angularytics I mean, the problem should come from config and run usage.
What error are you getting? What's going on otherwise? have you tried changing versions?
Thanks for the report!
—
Reply to this email directly or view it on GitHub #10 (comment) . https://github.com/notifications/beacon/j9yi2VKYyNfuAJMDa9D7nFvkojWQfWXAuMRY2yIzUY27Kx7Ez220St8ciYfpQYkH.gif
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3392 / Virus Database: 3209/6556 - Release Date: 08/06/13
Internal Virus Database is out of date.
from angularytics.
I was getting circular dependencies as an error. Also comment/code was to show how to incorporate this code in a pre-existing app. No, I have not tried changing versions of angularytics.
That's weird. Run must always be after config, but you can do just one config if you'd rather and inject $routeProvider, $locationProvider and AngularyticsProvider all together in one config.
Anyway, I'd recomment putting all Config together and then all Run together as they're called in different phases of App bootstrap.
from angularytics.
@mgonto I'm working with @johntom on this project too. The problem is that all config blocks are run in the order they are given to angular. Similarly all run blocks are run in the order presented. However, config and run blocks as a whole are run separately so it is ok to intermingle them.
See http://docs.angularjs.org/guide/module#moduleloadingdependencies
The configuration blocks get applied in the order in which they are registered. The only exception to it are constant definitions, which are placed at the beginning of all configuration blocks.
The issue we are presenting here is that it seems important that the Angularytics config block should be declared prior to the $routeProvider block to ensure that there aren't Circular Dependency errors. You may want to update the README.md.
from angularytics.
Ohhh ok.
I'll add this in the documentation then.
Unfourtenately, we do need to call that init
because otherwise the service never gets instantiated on AngularJS. Other than that, that init does nothing.
from angularytics.
Hi Martin,
While the console is properly showing the correct route, Google still reports only the in index page for the following http://gallery.meledandri.com/index.html#/index. Any ideas as to what I might be doing wrong.
TIA
John
From: Martin Gontovnikas [mailto:[email protected]]
Sent: Tuesday, August 13, 2013 3:07 PM
To: mgonto/angularytics
Cc: John R. Tomaselli
Subject: Re: [angularytics] Setup with existing application (#10)
Ohhh ok.
I'll add this in the documentation then.
Unfourtenately, we do need to call that init because otherwise the service never gets instantiated on AngularJS. Other than that, that init does nothing.
—
Reply to this email directly or view it on GitHub #10 (comment) . https://github.com/notifications/beacon/j9yi2VKYyNfuAJMDa9D7nFvkojWQfWXAuMRY2yIzUY27Kx7Ez220St8ciYfpQYkH.gif
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3392 / Virus Database: 3209/6556 - Release Date: 08/06/13
Internal Virus Database is out of date.
from angularytics.
Hey,
I think the problem is that Google ignores all of what's after #
. What would you expect it to track? Which URL? Because here, we can transform actually that #
to a /
and make it look like he's going to index/index
.
I didn't have that problem because I use html5mode
from angularytics.
Maybe we can add a check for html5mode and have it handle the Google api
differently based on that.
I'm not at my computer but could you suggest the proper place in your code
for a check like this?
On Aug 16, 2013 2:58 PM, "Martin Gontovnikas" [email protected]
wrote:
Hey,
I think the problem is that Google ignores all of what's after #. What
would you expect it to track? Which URL? Because here, we can transform
actually that # to a / and make it look like he's going to index/index.I didn't have that problem because I use html5mode
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-22786552
.
from angularytics.
I can handle HTML5mode without a problem, the question is how we should handle it?
Should we just remove the #/
and log the URL? Should we put them as query params? Or what. What do you think is best?
from angularytics.
Before calling the specific handler with the URL, if it's html5mode, we should change the URL there.
So possibilities are:
index#/index
toindex/index
index#/index
toindex?angularPath=/index
I think option 2 fits best.
from angularytics.
I agree. Option 1 could conflict if there is also a page at index/map along
with a route at index.Html#/map
Does google analytics handle query string parameters?
On Aug 17, 2013 10:37 PM, "Martin Gontovnikas" [email protected]
wrote:
Before calling the specific handler with the URL, if it's html5mode, we
should change the URL there.So possibilities are:
- index#/index to index/index
- index#/index to index?angularPath=/index
I think option 2 fits best.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-22823550
.
from angularytics.
By default they're included. You have to exclude them manually.
So I'd add an angularPath
query parameter to send after hashBang. Do you both agree?
http://cutroni.com/blog/2006/09/21/google-analytics-configuration-mistake-2-query-string-variables/
from angularytics.
I say lets try the angularPath query param for now and see how that works.
We can do some testing on @johntom's site and get back to you
On Sat, Aug 17, 2013 at 11:11 PM, Martin Gontovnikas <
[email protected]> wrote:
By default they're included. You have to exclude them manually.
So I'd add an angularPath query parameter to send after hashBang. Do you
both agree?http://cutroni.com/blog/2006/09/21/google-analytics-configuration-mistake-2-query-string-variables/
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-22823859
.
from angularytics.
@johntom there was a bug in how I handled Google Universal. Page wasn't sent in the PageView.
Please try again and let me know if this works. Just tagged 0.2.2
from angularytics.
Will do and I'll get back as soon as I know.
from angularytics.
It Works!
Thanks,
John
from angularytics.
That's awesome :).
Closing then
from angularytics.
Related Issues (20)
- .run-module-injection not working HOT 1
- Problem with routing after installing Angularytics HOT 1
- A way to disable auto trackPageView for soft 404 HOT 1
- Basic ng-click event?
- How to run in cordova/phonegap app? HOT 9
- Not Stated in GA setup as Mobile App or Website
- Compatibility with cookie consent
- Multiple directives asking for new/isolated scope HOT 1
- Bump version HOT 1
- Grunt test produces errors
- Run Angularytics only in production environment HOT 4
- AngularyticsProvider.disablePageViewTracking is not a function HOT 2
- Set tracking ID under config HOT 1
- User ID Setting HOT 2
- Error: ga is not deined HOT 5
- Request: New point release with the latest changes HOT 1
- Unknown provider: AngularyticsGoogleHandlerProvider HOT 1
- trackerName
- Unable to track events HOT 1
- Enable Support multiple GA Trackers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angularytics.