2019-05-03 08:17:27 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-02-11 19:34:14 +08:00
|
|
|
module CommonHelper
|
2014-01-25 17:42:25 -07:00
|
|
|
def render_google_universal_analytics_code
|
2014-08-18 12:12:48 +05:30
|
|
|
if Rails.env.production? && SiteSetting.ga_universal_tracking_code.present?
|
2014-01-25 17:42:25 -07:00
|
|
|
render partial: "common/google_universal_analytics"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-04-03 14:20:51 -04:00
|
|
|
def render_google_tag_manager_head_code
|
2021-03-26 11:19:31 -04:00
|
|
|
render partial: "common/google_tag_manager_head" if SiteSetting.gtm_container_id.present?
|
2018-04-03 14:20:51 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def render_google_tag_manager_body_code
|
2021-03-26 11:19:31 -04:00
|
|
|
render partial: "common/google_tag_manager_body" if SiteSetting.gtm_container_id.present?
|
2016-07-14 13:52:37 -04:00
|
|
|
end
|
2013-03-23 20:32:59 +05:30
|
|
|
end
|