Comments (11)
@NathanWalker
I finally figured it out. I'm running Quickstart ng2-rc1 inside a VS2015 project. I moved @angular and angulartics into my wwwroot/libraries folder.
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:
var map = {
'app': 'app',
'rxjs': 'libraries/rxjs',
'angular2-in-memory-web-api': 'libraries/angular2-in-memory-web-api',
'@angular': 'libraries/@angular',
'moment': 'libraries/moment/min/moment.min.js',
'angulartics2': 'libraries/angulartics2'
};
var packages = {
'app': { main: 'main.js', defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' },
'angular2-in-memory-web-api': { defaultExtension: 'js' },
'moment': { type: 'cjs', defaultExtension: 'js' },
'angulartics2': { main: 'index.js', defaultExtension: 'js' }
};
from angulartics2.
@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!
from angulartics2.
@rbaarsma did you ever figure this out? I'm seeing the same thing.
from angulartics2.
@jkufrin @rbaarsma You can likely follow this guide which I wrote to get ng2-dragula
setup with system register
format and QuickStart guide. Similar setup and changes would be needed for this lib as well:
https://github.com/valor-software/ng2-dragula/wiki#5-min-quickstart
from angulartics2.
@NathanWalker
Awesome. Thanks for the fast reply.
I just updated to the latest specs from https://angular.io/docs/ts/latest/quickstart.html, "angular2": "2.0.0-beta.15", etc...
I've got it working up until the point where I add Angulartics2GoogleAnalytics to the component providers. As soon as I add that, I get 2 errors in my console:
system.src.js:4935
GET http://localhost:3000/libraries/angular2/angulartics2.js/src/providers/angulartics2-google-analytics 404 (Not Found)
angular2-polyfills.js:332
Error: Error: XHR error (404 Not Found) loading http://localhost:3000/libraries/angular2/angulartics2.js/src/providers/angulartics2-google-analytics(…)
I can't tell why it's trying to concat the AGA path onto the end of the angulartics2.js
thanks
from angulartics2.
@NathanWalker
It's something with my System.config. I've tried all kinds of combinations of the code to try and include the libraries. You can see all the commented stuff I tried in my index below.
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:
import {Component} from 'angular2/angular2';
which is old. I'm wondering if something else is going on with the main library that is effected since the master angular2 core code has changed?
I appreciate any help you could throw my way.
index.txt
main.txt
app.component.txt
from angulartics2.
If you have a github repo you could share with me, I may can help later with a PR.
from angulartics2.
@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);
}
from angulartics2.
@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.
from angulartics2.
@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.
from angulartics2.
@NathanWalker Thanks for reaching out again. I appreciate it.
Unfortunately, I can't really post this project publicly. I did include a few of the files up above, with the extensions just switched from .ts to .txt so they could upload. You can see the first few steps of my project. I'm using all the latest stuff from https://angular.io/docs/ts/latest/quickstart.html, "angular2": "2.0.0-beta.15", etc...
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.
from angulartics2.
Related Issues (20)
- Allow extra information for Page method in Angulartics2Segment
- Custom Properties not working in Google Tag Manager HOT 1
- G4 in the new version of google analytics HOT 8
- The automated release is failing 🚨 HOT 1
- Matomo string value not processed properly HOT 1
- Angular 13 support HOT 1
- Which version to use for Angular 11.2.0? HOT 1
- Google analytics page view
- Mask the ids from the urls when I'm tracking pages
- Matomo : When resetUser() is fired then each futur event is tracked in a distinct visit HOT 1
- Dependency conflict between angulartics 11 and rxjs 6 HOT 1
- UI-Router Documentation HOT 1
- Angular 14 support HOT 6
- Getting duplicated entry in matomo backend.
- Support for standalone components HOT 2
- setUserProperties to GA could be setup with 'user_properties'
- Need more details to inject angularics2On directives in Angular v12
- Suport for new version Google Analytics 4 HOT 3
- Angulartics ivy support
- prerenderring - Angulartics2BaiduAnalytics ReferenceError: _hmt is not defined
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 angulartics2.