FIX: remove gtm_ua_domain_name setting because it's preferable to configure it in Google Tag Manager settings
This commit is contained in:
parent
857d54162b
commit
37162e476b
|
@ -15,9 +15,11 @@ module ApplicationHelper
|
|||
include ConfigurableUrls
|
||||
include GlobalPath
|
||||
|
||||
def google_universal_analytics_json(ua_domain_name)
|
||||
cookie_domain = ua_domain_name.gsub(/^http(s)?:\/\//, '')
|
||||
result = {cookieDomain: cookie_domain}
|
||||
def google_universal_analytics_json(ua_domain_name=nil)
|
||||
result = {}
|
||||
if ua_domain_name
|
||||
result[:cookieDomain] = ua_domain_name.gsub(/^http(s)?:\/\//, '')
|
||||
end
|
||||
if current_user.present?
|
||||
result[:userId] = current_user.id
|
||||
end
|
||||
|
@ -29,7 +31,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def google_tag_manager_json
|
||||
google_universal_analytics_json(SiteSetting.gtm_ua_domain_name)
|
||||
google_universal_analytics_json
|
||||
end
|
||||
|
||||
def shared_session_key
|
||||
|
|
|
@ -915,7 +915,6 @@ en:
|
|||
ga_universal_tracking_code: "Google Universal Analytics (analytics.js) tracking code code, eg: UA-12345678-9; see http://google.com/analytics"
|
||||
ga_universal_domain_name: "Google Universal Analytics (analytics.js) domain name, eg: mysite.com; see http://google.com/analytics"
|
||||
gtm_container_id: "Google Tag Manager container id. eg: GTM-ABCDEF"
|
||||
gtm_ua_domain_name: "Universal Analytics via Google Tag manager domain name. 'auto' is recommended."
|
||||
enable_escaped_fragments: "Fall back to Google's Ajax-Crawling API if no webcrawler is detected. See https://developers.google.com/webmasters/ajax-crawling/docs/learn-more"
|
||||
enable_noscript_support: "Enable standard webcrawler search engine support via the noscript tag"
|
||||
allow_moderators_to_create_categories: "Allow moderators to create new categories"
|
||||
|
|
|
@ -101,9 +101,6 @@ basic:
|
|||
client: true
|
||||
default: ''
|
||||
regex: "^GTM-"
|
||||
gtm_ua_domain_name:
|
||||
client: true
|
||||
default: 'auto'
|
||||
top_menu:
|
||||
client: true
|
||||
refresh: true
|
||||
|
|
Loading…
Reference in New Issue