{"id":116,"date":"2018-10-01T10:02:19","date_gmt":"2018-10-01T01:02:19","guid":{"rendered":"https:\/\/058.jp\/twentyseventeen\/?p=116"},"modified":"2018-10-02T08:31:14","modified_gmt":"2018-10-01T23:31:14","slug":"googleanalytics%e3%81%ae%e8%a8%ad%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/058.jp\/twentyseventeen\/archives\/116","title":{"rendered":"GoogleAnalytics\u306e\u8a2d\u7f6e"},"content":{"rendered":"<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d5\u30c3\u30af\u3092\u4f7f\u3046\u3068\u3001head\u5185\u306b\u30bf\u30b0\u3092\u8ffd\u52a0\u3067\u304d\u308b\u306e\u3067\u3001<\/p>\n<p><!--more--><\/p>\n<pre>\r\nadd_action( 'wp_head', 'add_meta_to_head' );\r\nfunction add_meta_to_head() {\r\n?&gt;\r\n&lt;!-- \u3053\u3053\u306bscript\u30bf\u30b0\u306a\u3069\u66f8\u304f\u3068\u53cd\u6620\u3055\u308c\u308b --&gt;\r\n&lt;?php\r\n}\r\n<\/pre>\n<p>\u5b50\u30c6\u30fc\u30de\u306e functions.php \u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304f\u3068\u3001Google Analytics \u542b\u3081\u3066\u3001\u4efb\u610f\u306escript\u30bf\u30b0\u306a\u3069\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\r\nadd_action( 'wp_head', 'add_meta_to_head' );\r\nfunction add_meta_to_head() {\r\n?&gt;\r\n&lt;!-- Global site tag (gtag.js) - Google Analytics --&gt;\r\n&lt;script async src=&quot;https:\/\/www.googletagmanager.com\/gtag\/js?id=UA-xxxxxxx-x&quot;&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\n  window.dataLayer = window.dataLayer || [];\r\n  function gtag(){dataLayer.push(arguments);}\r\n  gtag('js', new Date());\r\n\r\n  gtag('config', 'UA-xxxxxxx-x');\r\n&lt;\/script&gt;\r\n&lt;?php\r\n}\r\n<\/pre>\n<p>Analytics\u3001AdSense\u3001fontawesome\u3001GoogleMaps\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3069\u306a\u3069\u3001\u8aad\u307f\u8fbc\u307f\u305f\u3044\u3082\u306e\u304c\u69d8\u3005\u3042\u308b\u5834\u5408\u306f\u3001\u81ea\u529b\u3067\u30d5\u30c3\u30af\u3092\u66f8\u3051\u308b\u3068\u3001\u878d\u901a\u304c\u5229\u3044\u3066\u4f55\u304b\u3068\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d5\u30c3\u30af\u3092\u4f7f\u3046\u3068\u3001head\u5185\u306b\u30bf\u30b0\u3092\u8ffd\u52a0\u3067\u304d\u308b\u306e\u3067\u3001<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-116","post","type-post","status-publish","format-standard","hentry","category-operation"],"_links":{"self":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":5,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":155,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts\/116\/revisions\/155"}],"wp:attachment":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}