Skip to content

Commit

Permalink
test GTM
Browse files Browse the repository at this point in the history
  • Loading branch information
lanbau committed Jan 19, 2016
1 parent 1b9bd90 commit 807df86
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
3 changes: 0 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var cookieParser = require('cookie-parser')
var bodyParser = require('body-parser')

var routes = require('./routes/index')
var users = require('./routes/users')
var calendar = require('./routes/calendar')
var contacts = require('./routes/contacts')
var gmail = require('./routes/gmail')
Expand Down Expand Up @@ -35,7 +34,6 @@ app.use(cookieParser())
app.use(express.static(path.join(__dirname, 'public')))

app.use('/', routes)
app.use('/users', users)
app.use('/calendar', calendar)
app.use('/contacts', contacts)
app.use('/gmail', gmail)
Expand All @@ -44,7 +42,6 @@ app.use('/push', push)
app.use('/notes', notes)
app.use('/concepts', concepts)

app.use('/users', jwtCheck)
app.use('/calendar', jwtCheck)
app.use('/contacts', jwtCheck)
app.use('/gmail', jwtCheck)
Expand Down
43 changes: 43 additions & 0 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/lanbau/github/giantcrm/node_modules/.bin:/Users/lanbau/Library/Android/sdk/platform-tools:/Users/lanbau/Library/Android/sdk/tools:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/opt/local/bin:/opt/local/sbin:/Users/lanbau/anaconda/bin:/Users/lanbau/.rbenv/shims:/Users/lanbau/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/local/mysql/bin
10 verbose lifecycle [email protected]~start: CWD: /Users/lanbau/github/giantcrm
11 silly lifecycle [email protected]~start: Args: [ '-c', 'node ./bin/www' ]
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `node ./bin/www`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:818:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/lanbau/github/giantcrm
17 error Darwin 15.2.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v5.1.1
20 error npm v3.3.12
21 error code ELIFECYCLE
22 error [email protected] start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the [email protected] start script 'node ./bin/www'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the myapp package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node ./bin/www
23 error You can get their info via:
23 error npm owner ls myapp
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
5 changes: 5 additions & 0 deletions public/javascripts/gtm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KZ586C');
9 changes: 7 additions & 2 deletions views/calendar.jade
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ html(lang="en")
//if lt IE 9
script(src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js")
script(src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js")
script(src="javascripts/admin.js")
// End of Bootstrap
// Calendar API
script(src="javascripts/calendar.js")

script(src="https://apis.google.com/js/client.js?onload=checkAuth")
body
#wrapper
Expand Down Expand Up @@ -289,5 +289,10 @@ html(lang="en")
//- script(src="javascripts/morris-data.js")
// Custom Theme JavaScript
script(src="javascripts/sb-admin-2.js")
// Add An Event
script(src="javascripts/events.js")
noscript
iframe(src="//www.googletagmanager.com/ns.html?id=GTM-KZ586C", height="0", width="0", style="display:none;visibility:hidden")
script(src="javascripts/gtm.js")


0 comments on commit 807df86

Please sign in to comment.