內容簡介
您是否正在使用 UTM Source 追蹤網站內的連結點擊率?
這是非常不好的想法!這不僅會創建一個包含 utm_source 的新會話,並且會增加訪客統計數據,還會增加您正在追蹤的頁面的跳出率。
那麼解決方案是什麼?
在 Google Analytics 中使用 [事件追蹤](https://developers.google.com/analytics/devguides/collection/analyticsjs/events),可將事件(如連結點擊)捕獲到 Google Analytics 儀表板中。
例如:
下載免費電子書
但是,WordPress 可視編輯器會不斷清理 onClick 部分,因此我們製作了一個快捷代碼,可以避免每次清理之後重新做 onClick 部分的麻煩。
它是如何工作的?
使用我們的代碼,替換 A href 標記,如 <a onClick="ga('send', 'event', 'Downloads', 'Click', 'Ebook downloaded', '0');" href="http://example.com/wp-content/uploads/2015/06/free-ebook.pdf">Download Free Ebook</a>,使用我們的簡便代碼 [tac_ga url="http://example.com/wp-content/uploads/2015/06/free-ebook.pdf" category="Downloads" action="Click" label="Ebook Downloaded"]Download Free Ebook[/tac_ga]
默認情況下,此簡便代碼使用以下信息:
類別:鏈結
操作:點擊
標簽:輸入的 URL
如何檢查此代碼是否有效?
Google Analytics 的「即時」選項卡將顯示這些標籤是否有效。
此代碼不適用於以下情況:
*使用 Google Tag Manager 插件插入 Google Analytics
*使用 Monster Insights 插件(曾用名 Yoast's Google Analytics 插件)安裝 Google Analytics
外掛標籤
開發者團隊
② 後台搜尋「Track a click on Google Analytics」→ 直接安裝(推薦)
原文外掛簡介
Are you using UTM Source to track link clicks within your website?
That’s a really bad idea! Not only will it create a new session with the links utm_source and inflate your visitor stats, it will also increase the bounce rate on the page you’re tracking.
So what’s the solution?
Use [event tracking] (https://developers.google.com/analytics/devguides/collection/analyticsjs/events) on Google Analytics which capture events like a link click into your Google Analytics Dashboard.
For e.g.
Download Free Ebook
But then the WordPress Visual Editor will keep cleaning out the onClick part, so we made a quick shortcode that would save you from the trouble of redoing the onClick part everytime it got cleaned out.
How does it work?
In place of an A href tag like Download Free Ebook use our shortcode [tac_ga url="http://example.com/wp-content/uploads/2015/06/free-ebook.pdf" category="Downloads" action="Click" label="Ebook Downloaded"]Download Free Ebook[/tac_ga]
By default this shortcode uses the following information:
Category: link
Action: click
Label: The URL Entered
How do I check if this works
Google Analytics’ Real time tab will show you that these tags would or not.
Some cases in which this shortcode won’t work:
* You use Google Tag Manager to insert Google Analytics
* You use Monster Insights Plugin (Formerly Yoast’s Google Analytics Plugin) to install Google Analytics
