
Using a few Google Analytics advance filters, it’s very easy to create a handy Twitter-specific profile which groups together twitter sources such as web clients and short URL services.
If you've read my earlier post 2 easy ways to track social networks in Google Analytics, you should be quite familiar with using advance filters in Google Analytics. A large percentage of Twitter's traffic is coming from phone or desktop based clients, in which case they'll appear as direct traffic so be sure to place extra attention to filter three.
1. Create a new Google Analytics profile and name it 'Twitter Traffic':
I also find it very useful to add a date next to the new profile so I'll know when it went live and what sort of reporting data I should expect. Remember to always keep your original profile intact.

2. Click on 'edit' next to the new profile and add the following filters under 'add filters' option

3. Filter one (Grouping different twitter web clients services to one source)
Filter Name - Twitter Web Clients Traffic
Filter Type - custom filter then advanced
Field A -> Extract A - under campaign source add leading twitter web clients services (for example,
I’ve used twitter|ping\.fm|friendfeed|brightkite|hootsuite|twitthat|twitterfon|twittergadget)
Field B -> Extract B - none
Output To -> Constructor - campaign source and name it Twitter Web Clients Traffic
Field A Required - yes
Field B Required - no
Override Output Field - yes
Case Sensitive - no
4. Filter two (Grouping different URL shortening services to one source)
Filter Name - Twitter URL Shortening Traffic
Filter Type - custom filter then advanced
Field A -> Extract A - under campaign source add the leading twitter url services (for example, I’ve
used twitturly|bit\.ly|tr\.im|cli\.gs|zi\.ma|poprl|tinyurl|Is\.gd|snipr|snipurl|kl\.am|snurl|tiny\.cc|dwarfurl)
Field B -> Extract B - none
Output To -> Constructor - campaign source and name it Twitter URL Shortening Traffic
Field A Required - yes
Field B Required - no
Override Output Field - yes
Case Sensitive - no

5. Filter three (Tagging URL traffic)
This filter is based on Google url builder tool so you'll need to tag your links before posting them on Twitter. I've used 'tweets' for my custom source, but feel free to be more imaginative ;)
Filter Name - Twitter URL Tagging
Filter Type - custom filter then advanced
Field A -> Extract A - under campaign source type ‘tweets‘
Field B -> Extract B - none
Output To -> Constructor - campaign source and name it Twitter URL Tagging
Field A Required - yes
Field B Required - no
Override Output Field - yes
Case Sensitive - no

Result! Head to traffic sources and type 'twitter'. You'll be able to see the different Twitter groups which are generating your traffic and using advanced segments you'll be able to compare them.

Optional but recommended step - schedule a daily email containing your new traffic sources:
6. In your new Twitter profile head to 'All Traffic Sources' under the 'Traffic Sources' navigation and in the ' Find Source/Medium' containing window paste the following Twitter Web Clients Traffic|Twitter URL Shortening Traffic|Twitter URL Tagging and click go:

7. Now click on the email report button located at the top:
![]()
8. Click on the 'Schedule' tab, leave the 'Send to me' option ticked, decide if you'd like a daily, weekly or monthly email under the 'Date Range' option, leave the format as PDF for great visualization and click Schedule:


Result! Your PDF report will land in your inbox.



Reader comments (24)
2:00PM on 21st May 2009
Awesome tip with walkthrough - I'm wondering what the limit on characters is in the filter field, since there are so many twitter clients. Guess I'm going to find out...
Founder at Conversion Counts Ltd
2:06PM on 21st May 2009
@Pavlicko, the limit is 256 characters. You should be able to fit quite a few ;)
5:32PM on 21st May 2009
This is a great tut and I'm really impressed I actually managed to make it all work Ran Nir, you are an absolute star in my eyes!
9:43PM on 21st May 2009
Couldn't you achieve the same result with adavnced segments?
9:50PM on 21st May 2009
Don't forget to include sn.im in your list of filters -- it's the new, shorter domain for snipurl.com/snipr.com
10:08AM on 22nd May 2009
That's a lot of work for something that isn't going to work! Most people are using software clients, and they don't provided the referrer data you are using. Much better to use a URL shortening service that provides built-in analytics.
10:28AM on 22nd May 2009
How about an include filter if you only wanted to see just twitter traffic in that profile?
Include campaign source - (Twitter Web Clients Traffic)|(Twitter URL Shortening Traffic)
Founder at Conversion Counts Ltd
10:36AM on 22nd May 2009
@Benjamin Ellis, the combination of the two works well.
@jamr0ck, yes that can be done, perhaps more easily using an advanced segment.
Thanks for your comments and feedback.
Ran
11:04AM on 22nd May 2009
My only concern is the way that apps like tweetdeck and twitterfox will not pass referral data through the URL shorteners like tinyurl, which, to my knowledge, use 301's to pass the user through, and as such will register as direct traffic. any thoughts on this?
Perhaps a tutorial on deploying your own URL shortening service using full GA implementation would be a logical next step? (i've seen it done with wordpress!)
Founder at Conversion Counts Ltd
11:21AM on 22nd May 2009
@jamr0ck, you're right hence the need to tag your link using google's tool before shortening the URL.
5:30PM on 22nd May 2009
I'm not sure what does this profile does. Does it tell you how many people visit your Twitter profile? If not, what does it do?
Founder & Executive Chairman at MediaTrust
5:04PM on 23rd May 2009
very cool and useful. thank you. we are very heavey Twitter users at MediaTrust
11:08AM on 24th May 2009
Great post - can someone fix the images though?
4:22PM on 24th May 2009
@Emma Try a different browser. I was here on Google Chrome (same as Safari) and saw no images. Right-click open those images in new tab did shows them... so I figured, let's try another browser. Looking at the page in Firefox now and no problem
Founder at Conversion Counts Ltd
1:00PM on 26th May 2009
Thanks @Emma. I'll look to sort it with the econsultancy guys.
Ran
12:12AM on 28th May 2009
This trick won't work if you don't paste the Google Analytics tracking code into each of your website pages. Is that right?
3:19PM on 16th June 2009
This is not working, it sums up all the traffic my site receives. Possible mistakes I could have made?
12:13AM on 19th June 2009
Do you think I care about Twitter Traffic
10:05PM on 9th July 2009
We'll see how this works. I'd really like to see how much traffic my time on twitter generates. I can't see the picutres and don't have another browser to try, so I used the instructions only. Thanks.
Managing Director at Future Insight Analytics Ltd.
12:44PM on 10th August 2009
Hi Ran
I am very impressed with this article! I have just set all the profiles and gilters and am raring to go...
Thanks
Nikki Rae
12:16PM on 11th August 2009
I have tried this and waiting for the results....
8:27PM on 15th February 2010
this page is cool.
7:27PM on 23rd April 2010
Great idea - just wondering though if you are using URL shortner with Google Analytics UTM Tags for all links why would you need to track the URL shortner? Wouldn't the URL shortner referrer be replaced by the new UTM source, medium, etc.? Otherwise, I like the idea of consolidating for Twitter links and shortner links that come from other folks.
Thanks!
6:00AM on 18th August 2010
Thanks for this great walkthrough! I have been trying to learn lately how to really customise my analytics data so that I can ensure I am getting the most from it and can analyse it accordingly to optimize my sites.
Log in to post a comment