export default ({ app }) => {
  if (process.env.NODE_ENV !== 'production') { return false }
  ((i, s, o, g, r, a, m) => {
    i['GoogleAnalyticsObject'] = r
    i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }
    i[r].l = 1 * new Date()
    a = s.createElement(o)
    m = s.getElementsByTagName(o)[0]
    a.async = 1
    a.src = g
    m.parentNode.insertBefore(a, m)
  })(window, document, 'script', 'https://www.googletagmanager.com/gtag/js?id=UA-75421763-13', 'ga')
  window.dataLayer = window.dataLayer || []
  window.gtag = function () { window.dataLayer.push(arguments) }
  window.gtag('js', new Date())

  app.router.afterEach((to, from) => {
    // window.gtag('config', 'UA-75421763-13') // 安裝第一個 Google Analytics 與送出 PageView
    // window.gtag('config', 'UA-75421763-1') // 安裝第二個 Google Analytics 與送出 PageView
    // window.gtag('config', 'AW-858679249') // 安裝 Google Adwords
    // window.gtag('event', 'conversion', { 'send_to': 'AW-858679249/-STTCPaxg3sQ0c-5mQM' }) // 送出 Google Adwords 事件
  })
}

@@ -676,46 +676,175 @@
  // 
-window.gtag('config', 'UA-75421763-13'
+%E5%9B%A0%E7%82%BA%E7%B6%B2%E9%A0%81%E6%A8%99%E9%A1%8C%E6%B2%92%E6%9C%89%E6%9B%B4%E6%96%B0%E7%9A%84%E5%BE%88%E5%8D%B3%E6%99%82%EF%BC%8C%E6%89%80%E4%BB%A5%E5%BB%B6%E9%81%B2%E4%B8%80%E4%B8%8B%E7%99%BC%E9%80%81%0A    // window.setTimeout(() =%3E %7B%0A    //   window.gtag('config', 'UA-75421763-13', %7B 'page_title': window.document.title, 'page_path': to.path %7D
 ) //
@@ -878,32 +878,34 @@
  PageView%0A    //
+  
  window.gtag('co
@@ -926,16 +926,79 @@
 21763-1'
+, %7B 'page_title': window.document.title, 'page_path': to.path %7D
 ) // %E5%AE%89%E8%A3%9D%E7%AC%AC
@@ -1026,24 +1026,39 @@
 %E9%80%81%E5%87%BA PageView%0A
+    // %7D, 512)%0A
     // windo

修正 spa 傳送 ga 問題