Skip to content

Commit a6932ad

Browse files
committed
Reimplement Analytics
1 parent e8842c1 commit a6932ad

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/controllers/sync.coffee

+13
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ window.Sync =
4646
Spine.trigger 'sync:unauthorized'
4747
Spine.trigger 'sync:stop'
4848

49+
# analytics
50+
anal: ->
51+
$.ajax(
52+
Sync.generateRequest({request: "me"})
53+
).done (info) ->
54+
anal =
55+
name: info.display_name
56+
email: info.email
57+
countryCode: info.country
58+
language: navigator.language
59+
platform: navigator.platform
60+
$.get("http://banana.caffeinatedco.de/api/springseed.php", anal)
61+
4962
auth: (callback) ->
5063

5164
# Saves data after getting it from the auth server

app/index.coffee

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class App extends Spine.Controller
7878

7979
# We'll put the sync conenct here as well.
8080
Spine.trigger 'sync:authorized' if Sync.oauth.service != "undefined"
81+
Sync.anal()
8182

8283
# Stuff for node webkit.
8384
$('body').on 'mousedown', 'a', (e) ->

0 commit comments

Comments
 (0)