Giter VIP home page Giter VIP logo

Comments (17)

mgonto avatar mgonto commented on July 21, 2024

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.

johntom avatar johntom commented on July 21, 2024

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.

mgonto avatar mgonto commented on July 21, 2024

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.

fotomut avatar fotomut commented on July 21, 2024

@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.

mgonto avatar mgonto commented on July 21, 2024

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.

johntom avatar johntom commented on July 21, 2024

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.

mgonto avatar mgonto commented on July 21, 2024

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.

fotomut avatar fotomut commented on July 21, 2024

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.

mgonto avatar mgonto commented on July 21, 2024

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.

mgonto avatar mgonto commented on July 21, 2024

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.

from angularytics.

fotomut avatar fotomut commented on July 21, 2024

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.

mgonto avatar mgonto commented on July 21, 2024

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.

fotomut avatar fotomut commented on July 21, 2024

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.

mgonto avatar mgonto commented on July 21, 2024

@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.

johntom avatar johntom commented on July 21, 2024

Will do and I'll get back as soon as I know.

from angularytics.

johntom avatar johntom commented on July 21, 2024

It Works!
Thanks,
John

from angularytics.

mgonto avatar mgonto commented on July 21, 2024

That's awesome :).

Closing then

from angularytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.