Skip to content

Commit e4dbf1f

Browse files
committed
Google Analyticsの問題を修正
1 parent d4791d0 commit e4dbf1f

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

html-build/src/main.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import "./vender/font-awesome/font-awesome.css";
2-
import "./vender/source-code-pro/source-code-pro.css";
3-
import "./vender/bootstrap/bootstrap.css";
4-
51
import "./style/style.scss";
62

73
import "./scripts/main.js";

html-build/src/scripts/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ function init() {
7373
// Google Analytics の初期化コード
7474
// ---------------------------------
7575

76-
var _gaq = _gaq || [];
76+
var _gaq = window._gaq || [];
7777
_gaq.push(["_setAccount", "UA-34243464-2"]);
7878
_gaq.push(["_trackPageview"]);
79+
window._gaq = _gaq; // Windowに保存しないと動作しなくなる
7980
(function() {
8081
var ga = document.createElement("script");
8182
ga.type = "text/javascript";

html-build/src/style/style.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@import "../vender/font-awesome/font-awesome.css";
2+
@import "../vender/source-code-pro/source-code-pro.css";
3+
@import "../vender/bootstrap/bootstrap.css";
4+
15
// ======================================================
26
// 定数
37
// ======================================================

html/js/bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tool-generate-htmls/template-html.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<meta name="date" content="${article-dateModified}T00:00:00+09:00"/>
2727

2828
<link rel="icon" sizes="16x16 32x32 48x48 128x128 256x256" href="https://ics.media/wp-content/themes/icslab/img/favicon.ico"/>
29-
<script src="js/bundle.js?v=2018-02-23"></script>
29+
<script src="js/bundle.js?v=2018-02-23_a"></script>
3030
</head>
3131
<body class="tutorial theme-light">
3232

0 commit comments

Comments
 (0)