mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add userId to GA tracking
This commit is contained in:
@@ -15,6 +15,15 @@ module ApplicationHelper
|
||||
include ConfigurableUrls
|
||||
include GlobalPath
|
||||
|
||||
def ga_universal_json
|
||||
cookie_domain = SiteSetting.ga_universal_domain_name.gsub(/^http(s)?:\/\//, '')
|
||||
result = {cookieDomain: cookie_domain}
|
||||
if current_user.present?
|
||||
result[:userId] = current_user.id
|
||||
end
|
||||
result.to_json.html_safe
|
||||
end
|
||||
|
||||
def shared_session_key
|
||||
if SiteSetting.long_polling_base_url != '/'.freeze && current_user
|
||||
sk = "shared_session_key"
|
||||
|
||||
Reference in New Issue
Block a user