-
Notifications
You must be signed in to change notification settings - Fork 86
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
Allow to specify a title #30
Comments
'+' for such feature |
This should be added in the core readme/docs as an exmaple imo, as there are so many ways to do page titles in a SPA.. |
Seems to me like this should be handled by using the API directly (won't that be necessary anyhow? Since each route would have to be configured?) and turning off auto pageviews. |
Per Google's docs, I would expect something like this:
That way we could optionally specify |
@DanWilkerson exactly right this should be handled via the api - @m-spyratos currently the core pageTrack method if using route based auto tracking is Dynamic title resolutionThere are many like it but this one is mine ;) Not a huge fan of using rootScope, so any alternative methods are appreciated. Includes a directive for the Routes file with resolve(
DirectiveUse in html like:
Finally, make the page track call!
I need to do some more testing on the last piece to make sure there is not a race condition where |
@m-spyratos I see what you mean. I'll see if we can make this work, but Angulartics isn't designed specifically for Google Analytics - it's meant to be a plugin supporting a broad range of analytics providers with a standard syntax. There are tradeoffs, of course. |
@DanWilkerson I totally understand that Angulartics is meant to be generic. To be honest though, I am not so sure that this is a good thing if it poses such limitations. Of course it's not a deal breaker as you can create you own methods to handle specific scenarios, but I think this defeats its purpose. Nonetheless, this is a great product to setup analytics to your project fast and easy, so it would be great to overcome these issues. |
@m-spyratos I hear you. It would be nice to support the basic fields object. I'll be able to take a look at this probably this weekend, but don't hold me to it 😄 |
@DanWilkerson Thanks! No worries about time. If I can be of any help let me know. |
@timelf123 Looks like we could switch from whitelisting properties passed to
becomes
Any reason not to do this? This would let users take full advantage of any GA config they'd like without us having to add the property to the whitelist. |
@timelf123 just wanted to ping you on this again. I've got a PR in the oven to fix this, but before I submitted I wanted to see what you thought. |
I'm good with a PR at the minimum ;) The idea looks sound though - no reason we shouldn't conform to the GA API |
@timelf123 see #88 |
@danielsmink @m-spyratos this is merged in - you can specify a title by passing it with your
|
Great thanks! |
@danielsmink I created a PR updating the main site: angulartics/angulartics.github.io#9 I know this is for GA only but there is no GA doc available so I updated the main site. The alternative is that we add GA examples to the GA readme Let me know what works best. |
When sending a pageview it would be nice if we could send a custom title along with it. In our application detail pages of objects each have their own title. Right now the plugin just sends the route.
The text was updated successfully, but these errors were encountered: