Twitter tracking with Google Analytics using Twitter-Tools
6 Februarie 2009 - 12:51, 2 comentarii, 4,597 views
english version of this article |
For the WordPress bloggers that use Twitter Tools I made some modifications in /plugins/twitter-tools/twitter-tools.php at line 186 (line 480 at new version of this plugin, try to look for "$tweet->tw_text"). I inserted some tracking variables for Google Analytics
Making titles a long string without strange chars
$spaces = array(" ", "-", "!", "&", "’", "`", "?", "_");
$escapedtitle = str_replace($spaces, "", $post->post_title);
$link=get_permalink($post_id).’?utm_source=twitter&utm_medium=social-media&utm_campaign=’.$escapedtitle;
Instead of the original line at 187
$tweet->tw_text = sprintf(__($this->tweet_format, ‘twitter-tools’), $post->post_title, get_permalink($post_id));
I put this
$tweet->tw_text = sprintf(__($this->tweet_format, ‘twitter-tools’), $post->post_title, $link);
Reading these days this post written by Claudiu about tracking Twitter with Google Analytics and using for a long time ago Google URL Builder for tracking all my online marketing campaigns, I made this modifications in the plugin I use for updateing my twitters with my blog posts.
If you don’t use Twitter Tools and use online services like TinyUrl to shortening your URLs use the script provided by Claudiu on his post.
You’ll find your statistics in GA / trafic sources / campaigns under source=TWITTER and medium=SOCIAL-MEDIA. After that you can track stats for each tweet, looking to campaigns titles = your post title w/o spaces and ohter strange chars.
Another way to track your links is using this service, TwitClicks.com, which short your URLs but in the same time show you stats.
Keep an eye on your tweets!
No tags for this post. Discuta despre magazine online pe yahoo groups: Pentru a fi la curent cu ultimele articole, aboneaza-te la feed-ul RSS- Feed-ul RSS
- Aboneaza-te la acest blog prin email



english version of this article
Follow me on Twitter











Februarie 6th, 2009 at 18:38
[...] about Twitter Plugins as of February 6, 2009 Twitter tracking with Google Analytics using Twitter-Tools – liviutaloi.ro 02/06/2009 For the WordPress bloggers that use Twitter Tools I made some [...]
Februarie 7th, 2009 at 16:33
Test for measuring new comments as GOALS. I’ll be back with explanations soon.