diff --git a/lms/envs/common.py b/lms/envs/common.py index 59730af797a5..730cbf8dce1f 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1515,6 +1515,7 @@ def _make_mako_template_dirs(settings): GOOGLE_SITE_VERIFICATION_ID = '' GOOGLE_ANALYTICS_LINKEDIN = 'GOOGLE_ANALYTICS_LINKEDIN_DUMMY' GOOGLE_ANALYTICS_TRACKING_ID = None +GOOGLE_ANALYTICS_4_ID = None ######################## BRANCH.IO ########################### BRANCH_IO_KEY = '' diff --git a/lms/envs/production.py b/lms/envs/production.py index c76ca3e8591a..342877206b0b 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -694,6 +694,7 @@ def get_env_setting(setting): GOOGLE_ANALYTICS_TRACKING_ID = AUTH_TOKENS.get('GOOGLE_ANALYTICS_TRACKING_ID') GOOGLE_ANALYTICS_LINKEDIN = AUTH_TOKENS.get('GOOGLE_ANALYTICS_LINKEDIN') GOOGLE_SITE_VERIFICATION_ID = ENV_TOKENS.get('GOOGLE_SITE_VERIFICATION_ID') +GOOGLE_ANALYTICS_4_ID = AUTH_TOKENS.get('GOOGLE_ANALYTICS_4_ID') ##### BRANCH.IO KEY ##### BRANCH_IO_KEY = AUTH_TOKENS.get('BRANCH_IO_KEY') diff --git a/lms/templates/certificates/accomplishment-base.html b/lms/templates/certificates/accomplishment-base.html index 2f49154d62e8..38c306708f48 100644 --- a/lms/templates/certificates/accomplishment-base.html +++ b/lms/templates/certificates/accomplishment-base.html @@ -19,6 +19,19 @@ ${document_title} <%static:css group='style-certificates'/> + + + <% ga_4_id = static.get_value("GOOGLE_ANALYTICS_4_ID", settings.GOOGLE_ANALYTICS_4_ID) %> + % if ga_4_id: + + + % endif diff --git a/lms/templates/main.html b/lms/templates/main.html index 9ee3b6d5b13e..ac43e6eba25f 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -162,6 +162,18 @@ % endif +<% ga_4_id = static.get_value("GOOGLE_ANALYTICS_4_ID", settings.GOOGLE_ANALYTICS_4_ID) %> +% if ga_4_id: + + +% endif + <% branch_key = static.get_value("BRANCH_IO_KEY", settings.BRANCH_IO_KEY) %> % if branch_key and not is_from_mobile_app: + + {% endif %} + diff --git a/lms/templates/public_video_share_embed.html b/lms/templates/public_video_share_embed.html index e64a036c2c0f..cb81c7e15cce 100644 --- a/lms/templates/public_video_share_embed.html +++ b/lms/templates/public_video_share_embed.html @@ -86,6 +86,18 @@ % endif +<% ga_4_id = static.get_value("GOOGLE_ANALYTICS_4_ID", settings.GOOGLE_ANALYTICS_4_ID) %> +% if ga_4_id: + + +% endif + <% branch_key = static.get_value("BRANCH_IO_KEY", settings.BRANCH_IO_KEY) %> % if branch_key and not is_from_mobile_app: