Homebrew 會將安裝資訊送到 Google Analytics 上

Hacker News Daily 上看到 Homebrew 會將安裝資訊送到 Google Analytics 上面:「Homebrew's Anonymous Aggregate User Behaviour Analytics」。

opt-out 的方法有兩個,一個是環境變數,另外一個是透過 git 設定:

If after everything you've read you still wish to opt-out of Homebrew's analytics you may set HOMEBREW_NO_ANALYTICS=1 in your environment or run git config --file="$(brew --repository)/.git/config" --replace-all homebrew.analyticsdisabled true which will prevent analytics from ever being sent when either of them have been set.

Google Analytics 推出 Autotrack 工具幫助整合

Google Analytics 推出了 Autotrack 工具,讓開發者更容易整合:「Introducing Autotrack for analytics.js」。

可以看到有些地方是將 Unobtrusive JavaScript 的概念拿出來用,像是 Declarative event tracking 這邊用 data attribute:

<button data-event-category="Video" data-event-action="play">Play</button>

對於還沒有針對 Google Analytics 客製化整合的人都會有幫助:

While anyone could use and benefit from autotrack, the library is primarily geared toward sites that do not customize their current analytics implementation and would like to take advantage of the features described in this article.

GitHub 上的說明可以看到預設了非常多常用的功能,像是 socialTracker 預設就有提供 FacebookTwitter (咦,你們自己家的 Google Plus 呢?)

不過這個軟體有免責條款,不屬於 GA 的正式產品:

The autotrack library is not an official Google Analytics product and is not covered by Google Analytics Premium support. Developers that choose to use this library are responsible for ensuring that their implementation meets the requirements of the Google Analytics Terms of Service and the legal obligations of their respective country.

看起來先進很多,之後自己開發東西拿出來用用...

用 Google Analytics 偵測有多少使用者使用 Adblock

在「Find How Many Visitors Are Not Seeing Ads on your Website」這篇介紹了如何用 Google Analytics_trackEvent 偵測網站上有多少使用者使用 Adblock 類的軟體。

不過這完全會低估啊,會在意廣告而裝 Adblock 類的人之中,不少人還會順便擋掉 Google Analytics 啊 XD

不過這篇有提到一份報告,說 2014 整個 internet 使用 Adblock 的比率大約是 5%,而科技類網站會高出更多:(不過我抓不動這份 PDF...)

It is estimated that ~5% of website visitors are blocking ads (PDF report) and the situation could be far worse for websites that have a more tech-savvy audience.

用 Google Analytics 紀錄 JavaScript 錯誤...

Client-Side Error Logging With Google Analytics」這篇提到可以用 Google Analytics 紀錄 JavaScript 錯誤...

不過這不是即時的紀錄,倒是作者有提到可以交叉比對,當發生 JavaScript 錯誤對於其他參數的影響:

Track the impact of client-side errors on other business metrics. With the reporting in Google Analytics you can see how these errors are affecting bounce rate, conversion and sales.