Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

follow these step:

- Set 'YOUR GOOGLE ACCOUNT' in googleanalyticis.js placeholder with your google account id
- Create angular constant GOOGLE_ACCOUNT with your google account id (http://docs.angularjs.org/api/auto/object/$provide#constant)
- Add the service to your angular js app module:

``var app = angular.module('myapp', ['analytics']) {
Expand Down
4 changes: 2 additions & 2 deletions analyticsService.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var _gaq = _gaq || [];

angular.module('analytics', []).run(['$http', function($http) {
angular.module('analytics', []).run(['$http', 'GOOGLE_ACCOUNT', function($http, GOOGLE_ACCOUNT) {

_gaq.push(['_setAccount', 'YOUR GOOGLE ACCOUNT']);
_gaq.push(['_setAccount', GOOGLE_ACCOUNT]);
_gaq.push(['_trackPageview']);

var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
Expand Down