Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move trackPageview() from navigate() to loadUrl() #7

Open
mitio opened this issue Sep 21, 2012 · 1 comment
Open

Move trackPageview() from navigate() to loadUrl() #7

mitio opened this issue Sep 21, 2012 · 1 comment

Comments

@mitio
Copy link

mitio commented Sep 21, 2012

In one project of mine I needed to move the trackPageiew() call from the overridden version of Backbone.History#navigate() to Backbone.History#loadUrl(). That was needed because in this project I don't call navigate() manually. I just let the location hash change drive the navigation.

If only the hash changes, navigate() is not called and thus nothing is tracked. On the other hand, loadUrl() is called always, because navigate() calls it internally and I think that it might be a good idea to move the page tracking call there.

What do you think about this?

I can send you a PR with the changes if you think it's a good idea.

@aterris
Copy link
Owner

aterris commented Mar 11, 2013

I don't know how I let this slip and I sincerely apologize. I will take a look at your suggestion as soon as possible (hopefully sometime this week) and let you know what my thoughts are.

I just need to regain context, since I feel like what you bring up has come up previously, but I cannot remember off the top of my head and I can't investigate further at this moment.

So sorry about the 6 months delay and thanks for the input 💣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants