Adjust the settings of Piwik and add custom event analytics

pull/3392/head
graywolf336 9 years ago
parent c57cc93fd6
commit 213963671d
No known key found for this signature in database
GPG Key ID: A8E1226EF9A4A5B9
  1. 1
      .meteor/packages
  2. 1
      .meteor/versions
  3. 2
      packages/rocketchat-channel-settings/client/views/channelSettings.coffee
  4. 3
      packages/rocketchat-lib/client/methods/sendMessage.coffee
  5. 2
      packages/rocketchat-lib/i18n/ar.i18n.json
  6. 2
      packages/rocketchat-lib/i18n/cs.i18n.json
  7. 2
      packages/rocketchat-lib/i18n/de.i18n.json
  8. 2
      packages/rocketchat-lib/i18n/el.i18n.json
  9. 11
      packages/rocketchat-lib/i18n/en.i18n.json
  10. 2
      packages/rocketchat-lib/i18n/es.i18n.json
  11. 2
      packages/rocketchat-lib/i18n/fa.i18n.json
  12. 2
      packages/rocketchat-lib/i18n/fi.i18n.json
  13. 2
      packages/rocketchat-lib/i18n/fr.i18n.json
  14. 2
      packages/rocketchat-lib/i18n/he.i18n.json
  15. 2
      packages/rocketchat-lib/i18n/hr.i18n.json
  16. 2
      packages/rocketchat-lib/i18n/hu.i18n.json
  17. 2
      packages/rocketchat-lib/i18n/it.i18n.json
  18. 2
      packages/rocketchat-lib/i18n/ja.i18n.json
  19. 2
      packages/rocketchat-lib/i18n/km.i18n.json
  20. 2
      packages/rocketchat-lib/i18n/ko.i18n.json
  21. 2
      packages/rocketchat-lib/i18n/ku.i18n.json
  22. 2
      packages/rocketchat-lib/i18n/lo.i18n.json
  23. 2
      packages/rocketchat-lib/i18n/ms-MY.i18n.json
  24. 2
      packages/rocketchat-lib/i18n/nl.i18n.json
  25. 2
      packages/rocketchat-lib/i18n/pl.i18n.json
  26. 2
      packages/rocketchat-lib/i18n/pt.i18n.json
  27. 2
      packages/rocketchat-lib/i18n/ro.i18n.json
  28. 2
      packages/rocketchat-lib/i18n/ru.i18n.json
  29. 2
      packages/rocketchat-lib/i18n/sq.i18n.json
  30. 2
      packages/rocketchat-lib/i18n/sr.i18n.json
  31. 2
      packages/rocketchat-lib/i18n/sv.i18n.json
  32. 2
      packages/rocketchat-lib/i18n/ta-IN.i18n.json
  33. 2
      packages/rocketchat-lib/i18n/tr.i18n.json
  34. 2
      packages/rocketchat-lib/i18n/uk.i18n.json
  35. 2
      packages/rocketchat-lib/i18n/zh-TW.i18n.json
  36. 2
      packages/rocketchat-lib/i18n/zh.i18n.json
  37. 2
      packages/rocketchat-lib/server/methods/addOAuthService.coffee
  38. 3
      packages/rocketchat-lib/server/startup/settings.coffee
  39. 49
      packages/rocketchat-piwik/client/loadScript.js
  40. 24
      packages/rocketchat-piwik/client/trackEvents.js
  41. 16
      packages/rocketchat-piwik/package.js
  42. 27
      packages/rocketchat-piwik/server/settings.js
  43. 24
      packages/rocketchat-ui-master/master/main.coffee
  44. 1
      packages/rocketchat-ui-sidenav/side-nav/createChannelFlex.coffee

@ -74,6 +74,7 @@ rocketchat:migrations
rocketchat:oauth2-server-config
rocketchat:oembed
rocketchat:otr
rocketchat:piwik
rocketchat:push-notifications
rocketchat:reactions
rocketchat:slashcommands-invite

@ -170,6 +170,7 @@ rocketchat:oauth2-server@1.4.0
rocketchat:oauth2-server-config@1.0.0
rocketchat:oembed@0.0.1
rocketchat:otr@0.0.1
rocketchat:piwik@0.0.1
rocketchat:push-notifications@0.0.1
rocketchat:reactions@0.0.1
rocketchat:slashcommands-invite@0.0.1

@ -112,9 +112,11 @@ Template.channelSettings.onCreated ->
Meteor.call 'archiveRoom', @data?.rid, (err, results) ->
return handleError err if err
toastr.success TAPi18n.__ 'Room_archived'
#TODO: callback channel archived
else
if ChatRoom.findOne(@data.rid)?.archived is true
Meteor.call 'unarchiveRoom', @data?.rid, (err, results) ->
return handleError err if err
toastr.success TAPi18n.__ 'Room_unarchived'
#TODO: callback channel unarchived
@editing.set()

@ -4,7 +4,6 @@ Meteor.methods
return false
if _.trim(message.msg) isnt ''
if isNaN(TimeSync.serverOffset())
message.ts = new Date()
else
@ -19,5 +18,5 @@ Meteor.methods
message = RocketChat.callbacks.run 'beforeSaveMessage', message
RocketChat.promises.run('onClientMessageReceived', message).then (message) ->
ChatMessage.insert message
RocketChat.callbacks.run 'afterSaveMessage', message

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "سر",
"Accounts_OAuth_Custom_Token_Path" : "مسار رمزي",
"Accounts_OAuth_Custom_Token_Sent_Via" : "رمزي المرسلة عن طريق",
"Accounts_OAuth_Custom_URL" : "الرابط",
"URL" : "الرابط",
"Accounts_OAuth_Facebook" : "تسجيل الدخول الى الفيسبوك",
"Accounts_OAuth_Facebook_callback_url" : "URL الفيسبوك الاستدعاء",
"Accounts_OAuth_Facebook_id" : "الفيسبوك معرف التطبيق",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Cesta k tokenu",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token odesílány skrze",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook Přihlášení",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Callback URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Pfad des Token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token gesendet über",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Anmeldung über Facebook erlauben",
"Accounts_OAuth_Facebook_callback_url" : "Facebook-Callback-URL",
"Accounts_OAuth_Facebook_id" : "Facebook-App-ID",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Μυστικό",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token αποστέλλονται μέσω",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook Login",
"Accounts_OAuth_Facebook_callback_url" : "Facebook επανάκλησης URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,6 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Sent Via",
"Accounts_OAuth_Custom_URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook Login",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Callback URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",
@ -127,6 +126,9 @@
"All_messages" : "All messages",
"Allow_Invalid_SelfSigned_Certs" : "Allow Invalid Self-Signed Certs",
"Allow_Invalid_SelfSigned_Certs_Description" : "Allow invalid and self-signed SSL certificate's for link validation and previews.",
"Analytics_features_enabled" : "Features Enabled",
"Analytics_features_messages_Description" : "Tracks custom events related to actions a user does on messages.",
"Analytics_features_rooms_Description" : "Tracks custom events related to actions on a channel or group (create, leave, delete).",
"and" : "and",
"And_more" : "And more __length__",
"Animals_and_Nature" : "Animals & Nature",
@ -276,6 +278,7 @@
"Direct_Messages" : "Direct Messages",
"Displays_action_text" : "Displays action text",
"Do_you_want_to_change_to_s_question" : "Do you want to change to <strong>%s</strong>?",
"Domains": "Domains",
"Drop_to_upload_file" : "Drop to upload file",
"Dry_run" : "Dry run",
"Dry_run_description" : "Will only send one email, to the same address as in From. The email must belong to a valid user.",
@ -385,6 +388,7 @@
"False" : "False",
"Favorite_Rooms" : "Enable Favorite Rooms",
"Favorites" : "Favorites",
"Features_Enabled": "Features Enabled",
"Field" : "Field",
"Field_removed" : "Field removed",
"File_exceeds_allowed_size_of_bytes" : "File exceeds allowed size of __size__ bytes",
@ -761,12 +765,8 @@
"Pin_Message" : "Pin Message",
"Pinned_a_message" : "Pinned a message:",
"Pinned_Messages" : "Pinned Messages",
"PiwikAnalytics_url" : "Piwik Url",
"PiwikAnalytics_url_Description" : "The url where the Piwik resides, be sure to include the trialing slash. Example: //piwik.rocket.chat/",
"PiwikAnalytics_siteId" : "Piwik Site ID",
"PiwikAnalytics_siteId_Description" : "The site id to use for identifying this site. Example: 17",
"PiwikAnalytics_domains" : "Piwiki Domains",
"PiwikAnalytics_domains_Description" : "The domains which to track, separated by spaces. Example: *.rocket.chat",
"Placeholder_for_email_or_username_login_field" : "Placeholder for email or username login field",
"Placeholder_for_password_login_field" : "Placeholder for password login field",
"Please_add_a_comment" : "Please add a comment",
@ -1061,6 +1061,7 @@
"Upload_file_question" : "Upload file?",
"Uploading_file" : "Uploading file...",
"Uptime" : "Uptime",
"URL": "URL",
"Use_account_preference" : "Use account preference",
"Use_Emojis" : "Use Emojis",
"Use_initials_avatar" : "Use your username initials",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secreto",
"Accounts_OAuth_Custom_Token_Path" : "Ruta del Token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Via Enviado",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Iniciar de sesión con Facebook",
"Accounts_OAuth_Facebook_callback_url" : "URL de devolución de llamada Facebook",
"Accounts_OAuth_Facebook_id" : "App Id de Facebook",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "راز",
"Accounts_OAuth_Custom_Token_Path" : "مسیر نشانه رمز",
"Accounts_OAuth_Custom_Token_Sent_Via" : "رمز ارسال شده از طریق",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "ورود به فیس بوک",
"Accounts_OAuth_Facebook_callback_url" : "URL فیس بوک مخاطبین",
"Accounts_OAuth_Facebook_id" : "شناسه فیس بوک نرم افزار",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Token polku",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token lähetetään",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook-tunnus",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Takaisinsoitto URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "URL de Token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Jeton envoyé via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Connexion avec Facebook",
"Accounts_OAuth_Facebook_callback_url" : "Facebook URL de Callback",
"Accounts_OAuth_Facebook_id" : "ID Facebook App ",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "סוד",
"Accounts_OAuth_Custom_Token_Path" : "נתיב האסימון",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Via אסימון שנשלח",
"Accounts_OAuth_Custom_URL" : "כתובת",
"URL" : "כתובת",
"Accounts_OAuth_Facebook" : "כניסה לפייסבוק",
"Accounts_OAuth_Facebook_callback_url" : "כתובת אתר Callback פייסבוק",
"Accounts_OAuth_Facebook_id" : "מזהה יישומון פייסבוק",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Tajno",
"Accounts_OAuth_Custom_Token_Path" : "token Put",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token poslani putem",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook prijava",
"Accounts_OAuth_Facebook_callback_url" : "URL povratnog poziva Facebook",
"Accounts_OAuth_Facebook_id" : "ID aplikacije Facebook",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Titok",
"Accounts_OAuth_Custom_Token_Path" : "token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token keresztül küldött",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook bejelentkezés",
"Accounts_OAuth_Facebook_callback_url" : "Facebook visszahívás URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Segreto",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Inviato via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Accesso a Facebook",
"Accounts_OAuth_Facebook_callback_url" : "URL Facebook richiamata",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "シークレットキー",
"Accounts_OAuth_Custom_Token_Path" : "トークンパス",
"Accounts_OAuth_Custom_Token_Sent_Via" : "介して送信されるトークン",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook によるログインを有効にする",
"Accounts_OAuth_Facebook_callback_url" : "Facebook コールバック URL",
"Accounts_OAuth_Facebook_id" : "Facebook アプリケーション ID",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "កសម",
"Accounts_OAuth_Custom_Token_Path" : "ទង Token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "សញសមនផមរយ",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "ចសបក",
"Accounts_OAuth_Facebook_callback_url" : "URL របសសបកហញ",
"Accounts_OAuth_Facebook_id" : "លសមកមមវសបក",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "비밀",
"Accounts_OAuth_Custom_Token_Path" : "Token 경로",
"Accounts_OAuth_Custom_Token_Sent_Via" : "토큰 보낸 비아",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook 로그인",
"Accounts_OAuth_Facebook_callback_url" : "페이스 북 콜백 URL",
"Accounts_OAuth_Facebook_id" : "Facebook 앱 ID",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Dizî",
"Accounts_OAuth_Custom_Token_Path" : "Path token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Sent Via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "facebook Login",
"Accounts_OAuth_Facebook_callback_url" : "URL Facebook Callback",
"Accounts_OAuth_Facebook_id" : "Id Facebook App",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "ເສນທາງກາວສ token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token ສງຜານ",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "ເຟສບກເຂາສລະບບ",
"Accounts_OAuth_Facebook_callback_url" : "URL ເຟສບກຕດຕບ",
"Accounts_OAuth_Facebook_id" : "Id App ເຟສບກ",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Dihantar Via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Daftar masuk Facebook",
"Accounts_OAuth_Facebook_callback_url" : "URL Facebook Callback",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Geheim",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Sent Via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook Inloggen",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Callback URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token wysyłany przez",
"Accounts_OAuth_Custom_URL" : "Adres URL",
"URL" : "Adres URL",
"Accounts_OAuth_Facebook" : "Facebook Login",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Callback URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Enviado Por",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Login do Facebook",
"Accounts_OAuth_Facebook_callback_url" : "URL de Callback do Facebook",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Jeton Trimis Via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Logare cu Facebook",
"Accounts_OAuth_Facebook_callback_url" : "Facebook URL de apelare inversă",
"Accounts_OAuth_Facebook_id" : "Facebook App ID",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Ключ",
"Accounts_OAuth_Custom_Token_Path" : "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Токен посланными через",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook логин",
"Accounts_OAuth_Facebook_callback_url" : "Обратный URL-адрес Facebook",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "sekret",
"Accounts_OAuth_Custom_Token_Path" : "Path Token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Sent Via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Hyni me Facebook",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Callback URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "тајна",
"Accounts_OAuth_Custom_Token_Path" : "токен Пут",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Токен послата преко",
"Accounts_OAuth_Custom_URL" : "УРЛ адреса",
"URL" : "УРЛ адреса",
"Accounts_OAuth_Facebook" : "Фацебоок логин",
"Accounts_OAuth_Facebook_callback_url" : "Фацебоок УРЛ за повратни позив",
"Accounts_OAuth_Facebook_id" : "ИД фацебоок апликација",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Hemlighet",
"Accounts_OAuth_Custom_Token_Path" : "token Path",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token Sent Via",
"Accounts_OAuth_Custom_URL" : "Webbadress",
"URL" : "Webbadress",
"Accounts_OAuth_Facebook" : "Facebook-inloggning",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Callback URL",
"Accounts_OAuth_Facebook_id" : "Facebook App-ID",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "இரகசிய",
"Accounts_OAuth_Custom_Token_Path" : "டகன",
"Accounts_OAuth_Custom_Token_Sent_Via" : "டகன அனபபபடடத வழிக",
"Accounts_OAuth_Custom_URL" : "URL ஐ",
"URL" : "URL ஐ",
"Accounts_OAuth_Facebook" : "facebook தி",
"Accounts_OAuth_Facebook_callback_url" : "பிப அழ URL",
"Accounts_OAuth_Facebook_id" : "Facebook ஆப ஐடி",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Gizli",
"Accounts_OAuth_Custom_Token_Path" : "Jetonu Yolu",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Jetonu Sent Via",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook ile giriş",
"Accounts_OAuth_Facebook_callback_url" : "Facebook geri arama URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Kimliği",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "секрет",
"Accounts_OAuth_Custom_Token_Path" : "токен Шлях",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Токен посланими через",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook Ввійти",
"Accounts_OAuth_Facebook_callback_url" : "URL facebook Зворотній дзвінок",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "令牌路徑",
"Accounts_OAuth_Custom_Token_Sent_Via" : "令牌通過發送",
"Accounts_OAuth_Custom_URL" : "URL",
"URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook 登入",
"Accounts_OAuth_Facebook_callback_url" : "Facebook的回調網址",
"Accounts_OAuth_Facebook_id" : "Facebook應用程式ID",

@ -49,7 +49,7 @@
"Accounts_OAuth_Custom_Secret" : "自定义 OAuth 帐号密钥",
"Accounts_OAuth_Custom_Token_Path" : "自定义 OAuth token 地址",
"Accounts_OAuth_Custom_Token_Sent_Via" : "令牌通过发送",
"Accounts_OAuth_Custom_URL" : "自定义 OAuth 帐号 URL",
"URL" : "自定义 OAuth 帐号 URL",
"Accounts_OAuth_Facebook" : "Facebook OAuth 登录",
"Accounts_OAuth_Facebook_callback_url" : "Facebook 回调 URL",
"Accounts_OAuth_Facebook_id" : "Facebook 应用程序 ID",

@ -9,7 +9,7 @@ Meteor.methods
name = name.toLowerCase().replace(/[^a-z0-9]/g, '')
name = s.capitalize(name)
RocketChat.settings.add "Accounts_OAuth_Custom_#{name}" , false , { type: 'boolean', group: 'OAuth', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Enable', persistent: true }
RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_url" , '' , { type: 'string' , group: 'OAuth', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_URL', persistent: true }
RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_url" , '' , { type: 'string' , group: 'OAuth', section: "Custom OAuth: #{name}", i18nLabel: 'URL', persistent: true }
RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_token_path" , '/oauth/token' , { type: 'string' , group: 'OAuth', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Token_Path', persistent: true }
RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_identity_path" , '/me' , { type: 'string' , group: 'OAuth', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Identity_Path', persistent: true }
RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_authorize_path" , '/oauth/authorize', { type: 'string' , group: 'OAuth', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Authorize_Path', persistent: true }

@ -94,9 +94,6 @@ RocketChat.settings.addGroup 'General', ->
@add 'Force_SSL', false, { type: 'boolean', public: true }
@add 'GoogleTagManager_id', '', { type: 'string', public: true }
@add 'GoogleSiteVerification_id', '', { type: 'string', public: false }
@add 'PiwikAnalytics_url', '', { type: 'string', public: false }
@add 'PiwikAnalytics_siteId', '', { type: 'string', public: false }
@add 'PiwikAnalytics_domains', '', { type: 'string', public: false }
@add 'Restart', 'restart_server', { type: 'action', actionText: 'Restart_the_server' }
@section 'UTF8', ->

@ -0,0 +1,49 @@
Template.body.onRendered(() => {
Tracker.autorun((c) => {
let url = RocketChat.settings.get('PiwikAnalytics_url');
let siteId = RocketChat.settings.get('PiwikAnalytics_siteId');
if (Match.test(url, String) && url.trim() !== '' && Match.test(siteId, String) && siteId.trim() !== '') {
c.stop();
window._paq = window._paq || [];
if (Meteor.userId()) {
window._paq.push(['setUserId', Meteor.userId()]);
}
window._paq.push(['trackPageView']);
window._paq.push(['enableLinkTracking']);
(() => {
window._paq.push(['setTrackerUrl', url + 'piwik.php']);
window._paq.push(['setSiteId', Number.parseInt(siteId)]);
let d = document;
let g = d.createElement('script');
let s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = url + 'piwik.js';
s.parentNode.insertBefore(g, s);
})();
}
});
});
//Track logins and associate user ids with piwik
(() => {
let oldUserId = null;
Meteor.autorun(() => {
let newUserId = Meteor.userId();
if (oldUserId === null && newUserId) {
if (window._paq) {
window._paq.push(['trackEvent', 'User', 'Login', newUserId ]);
window._paq.push(['setUserId', newUserId]);
}
} else if (newUserId === null && oldUserId) {
if (window._paq) {
window._paq.push(['trackEvent', 'User', 'Logout', oldUserId ]);
}
}
oldUserId = Meteor.userId();
});
})();

@ -0,0 +1,24 @@
//Trigger the trackPageView manually as the page views don't seem to be tracked
FlowRouter.triggers.enter([function updatePiwik(route) {
if (window._paq) {
let http = location.protocol;
let slashes = http.concat('//');
let host = slashes.concat(window.location.hostname);
window._paq.push(['setCustomUrl', host + route.path]);
window._paq.push(['trackPageView']);
}
}]);
//Custom events
RocketChat.callbacks.add('afterSaveMessage', (message) => {
if (window._paq && RocketChat.settings.get('PiwikAnalytics_features_messages')) {
window._paq.push(['trackEvent', 'Message', 'Send', ChatRoom.findOne({ _id: message.rid }).name ]);
}
}, 2000);
RocketChat.callbacks.add('afterCreateChannel', (channel) => {
if (window._paq && RocketChat.settings.get('PiwikAnalytics_features_rooms')) {
window._paq.push(['trackEvent', 'Room', 'Create', channel.name]);
}
});

@ -0,0 +1,16 @@
Package.describe({
name: 'rocketchat:piwik',
version: '0.0.1',
summary: 'Piwik integeration for Rocket.Chat',
git: ''
});
Package.onUse(function(api) {
api.versionsFrom('1.0');
api.use([ 'ecmascript', 'rocketchat:lib' ]);
api.use([ 'templating', 'kadira:flow-router'], 'client');
api.addFiles([ 'client/loadScript.js', 'client/trackEvents.js' ], 'client');
api.addFiles([ 'server/settings.js' ], 'server');
});

@ -0,0 +1,27 @@
RocketChat.settings.addGroup('Piwik', function addSettings() {
this.add('PiwikAnalytics_url', '', {
type: 'string',
public: true,
i18nLabel: 'URL'
});
this.add('PiwikAnalytics_siteId', '', {
type: 'string',
public: true,
i18nLabel: 'Client_ID'
});
this.section('Analytics_features_enabled', function addFeaturesEnabledSettings() {
this.add('PiwikAnalytics_features_messages', true, {
type: 'boolean',
public: true,
i18nLabel: 'Messages',
i18nDescription: 'Analytics_features_messages_Description'
});
this.add('PiwikAnalytics_features_rooms', true, {
type: 'boolean',
public: true,
i18nLabel: 'Rooms',
i18nDescription: 'Analytics_features_rooms_Description'
});
});
});

@ -52,30 +52,6 @@ Template.body.onRendered ->
j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl
f.parentNode.insertBefore j, f
Tracker.autorun (c) ->
w = window
p = '_paq'
url = RocketChat.settings.get 'PiwikAnalytics_url'
siteId = RocketChat.settings.get 'PiwikAnalytics_siteId'
domains = RocketChat.settings.get 'PiwikAnalytics_domains'
if Match.test(url, String) and url.trim() isnt '' and Match.test(siteId, String) and siteId.trim() isnt '' and Match.test(domains, String) and domains.trim() isnt ''
c.stop()
do (w, p, url, siteId, domains) ->
w[p] = w[p] || []
w[p].push(['setDomains', [domains.split(' ')]])
w[p].push(['trackPageView'])
w[p].push(['enableLinkTracking'])
w[p].push(['setTrackerUrl', url + 'piwik.php'])
w[p].push(['setSiteId', Number.parseInt(siteId)])
d = document
g = d.createElement('script')
s = d.getElementsByTagName('script')[0]
g.type = 'text/javascript'
g.async = true
g.defer = true
g.src = url + 'piwik.js'
s.parentNode.insertBefore(g, s)
Tracker.autorun (c) ->
if RocketChat.settings.get 'Meta_language'
c.stop()

@ -104,6 +104,7 @@ Template.createChannelFlex.events
SideNav.closeFlex ->
instance.clearForm()
RocketChat.callbacks.run 'afterCreateChannel', { _id: result.rid, name: name }
FlowRouter.go 'channel', { name: name }
else
console.log err

Loading…
Cancel
Save