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
Can't get it to work with angular quickstart / systemjs #14
Comments
@rbaarsma did you ever figure this out? I'm seeing the same thing. |
@jkufrin @rbaarsma You can likely follow this guide which I wrote to get |
@NathanWalker I just updated to the latest specs from https://angular.io/docs/ts/latest/quickstart.html, "angular2": "2.0.0-beta.15", etc... system.src.js:4935 angular2-polyfills.js:332 I can't tell why it's trying to concat the AGA path onto the end of the angulartics2.js thanks |
@NathanWalker The paths stuff you mention in dragula did not work. I thought I was close when I tried using map, lines 41-42 on the attached index. It allows the main script to work, but it's also concatenating the google-analytics script and throwing that error up above. I notice that you're using: I appreciate any help you could throw my way. |
If you have a github repo you could share with me, I may can help later with a PR. |
@jkufrin nope didn't get it to work. In the end I simply put the pageview in my custom secure-router-outlet.ts and didn't bother with this bundle (except steal ideas from it's source code) // track google analytics pageview
if (ga) {
if (this._api.user) {
ga('set', '&uid', this._api.user.id);
}
ga('send', 'pageview', instruction.urlPath);
} |
@rbaarsma not steeling ideas, the code is MIT, you are just learning one way of doing it. ;) We should still try to help ease the use of this library for everyone. @NathanWalker I am assigning you to the issue as I am not familiar with quickstart or system.config. You probably can do it better. Probably should add some reference to docs with proper configuration. |
@jkufrin As mentioned, if you have a github project you could share, I could help further. Configuring SystemJS is very specific and dependent upon the entire setup you are working with so would need to see it in entirety to help further. Seeing bits and pieces often leaves out most important thing. |
@NathanWalker Thanks for reaching out again. I appreciate it. I see that the repo was updated 4 days ago and again yesterday, with notes about updating it to beta.17. I will update my project to beta17 and get the latest version of angulartics2 and see if everything is working now. |
@NathanWalker The map and package objects needed to be updated from what you show in your Readme documenation. Here's a snippet from my updated systemjs.config.js file: |
@jkufrin Your most recent comment with 'angulartics2': { main: 'index.js', defaultExtension: 'js' } and in particular the main: 'index.js' fixed my similar issue. Thank you! |
I'm using the angular2 quickstart setup together with ng2-bootstrap. Everything is working and I would love to add angulartics, but I can't get it to work.
These are the errors in my Chrome console:
In the Network tab both angulartics2.js and angulartics2-google-analytics.js are loading propertly, but then they are loaded again and searched as /angulartics2 and /angulartics2/src/providers/angulartics2-google-analytics and both of them return "Loading..."
I've tried to map "angulartics2": "node_modules/angulartics2" and a bunch of other variations. Strangely I can at most seem to get one of the "Loading..." messages to return depending on my map, but not both..
This is my index.html:
The text was updated successfully, but these errors were encountered: