Add Google Analytics

This commit is contained in:
shaun 2016-10-09 20:14:45 +11:00
commit 15596645c6
5 changed files with 87 additions and 1 deletions

View file

@ -22,6 +22,7 @@ import read_embyserver as embyserver
import userclient
import videonodes
from utils import window, settings, language as lang
from ga_client import GoogleAnalytics
##################################################################################################
@ -75,9 +76,13 @@ class LibrarySync(threading.Thread):
def startSync(self):
ga = GoogleAnalytics()
# Run at start up - optional to use the server plugin
if settings('SyncInstallRunDone') == "true":
ga.sendEventData("SyncAction", "FastSync")
# Validate views
self.refreshViews()
completed = False
@ -99,6 +104,7 @@ class LibrarySync(threading.Thread):
completed = ManualSync().sync()
else:
# Install sync is not completed
ga.sendEventData("SyncAction", "FullSync")
completed = self.fullSync()
return completed