選單

MailCounter 加入一段原始碼,追蹤文章被轉寄的次數

mailcounter-logo

MailCounter是一個相當實用的功能,只要在部落格內加入一個語法,就能讓使用者輕鬆轉寄文章,並顯示出文章被轉寄的次數,如同 TweetMeme 或 Facebook 的按鈕。這項工具是由 The Next Web 所開發,如果你想知道你的文章被轉寄的多不多,只要將語法加入網頁即可。

使用教學

MailCounter 的顯示樣式如下:

mailcounter-sample

JavaScript 語法:將以下原始碼複製到你的網站要顯示按鈕的位置,記得將 https://yoururlhere.com 和 title of your page here 變更為頁面網址以及頁面標題。

[php]

<iframe src="getmailcounter.com/mailcounter/?url=yoururlhere.com&title=title of your page here" height="64" width="50" frameborder="0" scrolling="no"></iframe>

[/php]

WordPress 語法(自己架設WordPress):複製以下原始碼,加入你的模版 single.php 和 index.php 等檔案裡。

[php]

<?phpecho ‘<iframe src="getmailcounter.com/mailcounter/?url=’;urlencode(the_permalink());echo ‘&title=’;urlencode(the_title());echo ‘" height="64" width="50" frameborder="0" scrolling="no" ></iframe>’;?>

[/php]

MailCounter 網址:https://getmailcounter.com/

分享本文