Skip to content
Snippets Groups Projects
Unverified Commit 7a711861 authored by Ned Batchelder's avatar Ned Batchelder Committed by GitHub
Browse files

Merge pull request #17810 from open-craft/afzaledx/move_site_verification_id_to_settings

Moved the ID used in the google-site-verification meta tag to settings
parents b425826d cc6c95b3
No related merge requests found
......@@ -730,6 +730,7 @@ ADVANCED_SECURITY_CONFIG = ENV_TOKENS.get('ADVANCED_SECURITY_CONFIG', {})
GOOGLE_ANALYTICS_ACCOUNT = AUTH_TOKENS.get('GOOGLE_ANALYTICS_ACCOUNT')
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')
##### BRANCH.IO KEY #####
BRANCH_IO_KEY = AUTH_TOKENS.get('BRANCH_IO_KEY')
......
......@@ -795,6 +795,7 @@ TRACKING_SEGMENTIO_SOURCE_MAP = {
######################## GOOGLE ANALYTICS ###########################
GOOGLE_ANALYTICS_ACCOUNT = None
GOOGLE_SITE_VERIFICATION_ID = None
GOOGLE_ANALYTICS_LINKEDIN = 'GOOGLE_ANALYTICS_LINKEDIN_DUMMY'
######################## BRANCH.IO ###########################
......
......@@ -18,6 +18,7 @@ from django.core.urlresolvers import reverse
from django.utils.http import urlquote_plus
from django.utils.translation import ugettext as _
from django.utils.translation import get_language_bidi
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
from openedx.core.release import RELEASE_LINE
from pipeline_mako import render_require_js_path_overrides
......@@ -122,7 +123,12 @@ from pipeline_mako import render_require_js_path_overrides
<%include file="widgets/segment-io.html" />
<meta name="path_prefix" content="${EDX_ROOT_URL}">
<meta name="google-site-verification" content="_mipQ4AtZQDNmbtOkwehQDOgCxUUV2fb_C0b6wbiRHY" />
<% google_site_verification_id = configuration_helpers.get_value('GOOGLE_SITE_VERIFICATION_ID', settings.GOOGLE_SITE_VERIFICATION_ID) %>
% if google_site_verification_id:
<meta name="google-site-verification" content="${google_site_verification_id}" />
% endif
<meta name="openedx-release-line" content="${RELEASE_LINE}" />
<% ga_acct = static.get_value("GOOGLE_ANALYTICS_ACCOUNT", settings.GOOGLE_ANALYTICS_ACCOUNT) %>
......
......@@ -179,6 +179,13 @@ In addition, there are some other changes you'll need to make:
in the Django settings, or by setting the newly-added "GOOGLE_ANALYTICS_ACCOUNT"
config value in your site configuration.
* You can set the google site verification ID in the GOOGLE_SITE_VERIFICATION_ID
in your site configuration. Otherwise, edit the /edx/app/edxapp/lms.env.json
file to set the value for GOOGLE_SITE_VERIFICATION_ID. Setting the value for
GOOGLE_SITE_VERIFICATION_ID will add the meta tag for google site verification
in the lms/templates/main.html which is the main Mako template that all page
templates should include.
* If you don't want the Google Analytics JavaScript to be output at all in your
site, set the "GOOGLE_ANALYTICS_ACCOUNT" config value to the empty string.
If you want to customize the way that Google Analytics is loaded, set the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment