Skip to content

Commit

Permalink
feat: 🎸 Google Tag Manager を導入した (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikukyugamer authored Nov 26, 2022
1 parent b2bbeca commit 0d3e7d6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 26 deletions.
36 changes: 36 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title><%= this_page_title %></title>
<%= favicon_link_tag %>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link href="https://fonts.googleapis.com/earlyaccess/notosansjapanese.css" rel="stylesheet" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<% if request.path_info == root_path %>
<meta content="60" http-equiv="refresh" />
<% end %>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-52G88WJ');</script>
<!-- End Google Tag Manager -->
</head>
<body data-controller="<%= params[:controller] %>">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-52G88WJ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<%= render 'shared/navbar' %>
<%= yield %>
<%= render 'shared/footer' %>
</body>
</html>
26 changes: 0 additions & 26 deletions app/views/layouts/application.html.slim

This file was deleted.

0 comments on commit 0d3e7d6

Please sign in to comment.