-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #333 from IUBLibTech/google_analytics
Google analytics
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<%= content_tag :html, class: 'no-js', **html_tag_attributes do %> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Internet Explorer use the highest version available --> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
|
||
<title><%= render_page_title %></title> | ||
<%= opensearch_description_tag application_name, opensearch_catalog_url(format: 'xml') %> | ||
<%= favicon_link_tag %> | ||
<%= stylesheet_link_tag "application", media: "all" %> | ||
<%= javascript_include_tag "application" %> | ||
|
||
<% if ENV['SITE_HOST']&.include?('.edu') %> | ||
<!-- Google tag (gtag.js) --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J2B2XVXX8M"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'G-J2B2XVXX8M'); | ||
</script> | ||
<% end %> | ||
|
||
<%= csrf_meta_tags %> | ||
<%= content_for(:head) %> | ||
</head> | ||
|
||
<body class="<%= render_body_class %>"> | ||
<nav id="skip-link" role="navigation" aria-label="<%= t('blacklight.skip_links.label') %>"> | ||
<%= link_to t('blacklight.skip_links.search_field'), '#search_field', class: 'element-invisible element-focusable rounded-bottom py-2 px-3', data: { turbolinks: 'false' } %> | ||
<%= link_to t('blacklight.skip_links.main_content'), '#main-container', class: 'element-invisible element-focusable rounded-bottom py-2 px-3', data: { turbolinks: 'false' } %> | ||
<%= content_for(:skip_links) %> | ||
</nav> | ||
<%= render partial: 'shared/header_navbar' %> | ||
|
||
<main id="main-container" class="<%= container_classes %>" role="main" aria-label="<%= t('blacklight.main.aria.main_container') %>"> | ||
<%= content_for(:container_header) %> | ||
|
||
<%= render partial: 'shared/flash_msg', layout: 'shared/flash_messages' %> | ||
|
||
<div class="row"> | ||
<%= content_for?(:content) ? yield(:content) : yield %> | ||
</div> | ||
</main> | ||
|
||
<%= render partial: 'shared/footer' %> | ||
<%= render partial: 'shared/modal' %> | ||
</body> | ||
<% end %> |