Google Analytics affects everyone in search engine marketing (unless you use another analytics package!) but not everyone knows how to take full advantage of it. To take full advantage of it we have to share knowledge and that's what I'm here to do. I'll be sharing some great advanced segments, how to do multiple goal conversion tracking and the secret success behind cross domain tracking.
1. Advanced Segments
Advanced segments provide you with the ability to take your reporting up a gear. So many people mention it, but how and what should I be doing? Asking that question in a mirror won't provide any answers but here's something that will....
Social media segment
If you are paying for social media traffic then it's imperative that you check the value it yields to sales i.e. does it even generate any direct sales? Here's how to find out:
Click on the My Site tab > Advanced Segments > Then click on +New Custom Segment > Choose a name for it > Then click on +Add a dimension or metric > then add "Source" as a dimension > have it as "include" and "matching regular expression" then using a bit of regex, type the following in the field.
(facebook|twitter|linkedin|stumbleupon|youtube|vimeo|myspace|delicious|reddit|tumblr)
Click on test segment (check that it works!). Obviously find out the most relevant ones to your site and build up an accurate social media segment. Apply this to your reports and you can now segment your social media channel. Try cross tabbing by goal conversions to find out which channel is bringing in the beans.
Long tail keywords segment
Another useful advanced segment is to understand the long tail demand. Follow the same methodology to get into the advanced segment dashboard but follow this:
Click on +Add a dimension or metric > then add "Keyword" as a dimension > have it as "include" and "matching regular expression" then type the following in the field.
^\s*[^\s]+(\s+[^\s]+){2}\s*$
Applying this segment to your reports will show you keywords with greater than two words. To filter more or less keywords simply change the number, for example if I wanted searches with greater than four keywords then I would modify it as follows:
^\s*[^\s]+(\s+[^\s]+){3}\s*$
When applied to your reports it will show you keywords with greater than three words.
Non Branded keywords segment
This is useful if you want to understand search without any branded terms. Follow the same methodology to get into the advanced segment dashboard but follow this:
For this to make sense, imagine my company is called John Lewis.
Click on +Add a dimension or metric > then add "Keyword" as a dimension > have it as "exclude" and "matching regular expression" then type the following regex in the field.
(John|Lewis|Jon|Luis|Lews|…….)
Exclude these terms and the misspellings of the brand terms. Applying this segment will allow you to differentiate between non branded keywords. I wonder how relevant this will be to SEOs with the introduction of SSL Search by Google?
2. Multiple Goal Conversion Tracking
Goal tracking is simple, name your goal, add your goal URL i.e. /thank-you, setup a funnel etc. That's all great but let's say we have two paths to get people to register on our site as follows:
Path 1 - www.fabian.com/my_work = they registered from my home page and landed on my dashboard page.
Path 2 - www.fabian.com/download = they registered in order to access my free carpet samples.
Both destinations lead to a registration, so how do you create a goal with multiple URLs? Here's what to do:
Get to the goal dashboard > name your goal > select goal type as "URL Destination"> then enter some regex into the Goal URL as shown below > on the "Match Type" field, select Regular Expression Match and save it.
/(my_work|download)$
You can remove the dollar ($) symbol at the end of it, if you want to capture dynamic elements.
To see a breakdown of the goal and to check that it is recording the correct pages, use the Goal Verification Report or Goal URLs (new analytics). I've tested this and it works 100%.
3. Cross Domain Tracking
The GA tracking cookies are first party cookies, which mean they can be used only by the website that sets them. If a visitor decided to leave the site to a different domain, the tracking cookies won't work. For example if your site accepts third party payments on another site then you will need use cross domain tracking to preserve the referral.
For cross domain tracking to work you need to have the Google Analytics Tracking Code (GATC) on both domains and the third party site must not prohibit query string parameters.
Step 1 – Modify the GATC
Go to Analytics Settings > Tracking Code > Select "Multiple top-level domains" radio button > Google Analytics will provide you with two new lines of code as shown below.
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
It's possible to get a cookie with a domain of www.seogadget.co.uk and .seogadget.co.uk which would mean getting more than one set of cookies per visitor. According to Justin Cutroni, it's usually best practice to use the primary domain of your website instead of the 'none'. For example I would use '.seogadget.co.uk' to avoid multiple instances of the Google Analytics tracking cookies.
Step 2 – Transferring the cookies
Analytics has two methods to transfer the tracking cookies between the two domains which are _link() and _linkByPost()
Both extract the cookie values from the cookies and place the data in the destination page URL as query string parameters. Imagine our primary domain is www.seogadget.co.uk and our 3rd party payment site is www.moneyforfabian.com then apply the following:
Example 1 = If your website transfers the visitor between domains using standard anchor tags, use _link()
<a href="https://www.moneyforfabian.com" onclick=
"_gaq.push(['_link', 'https://www.seogadget.com']);return false; ">Buy Now</a>']);
Example 2 = If your website uses a form to transfer visitors between domains then you need to use _linkbypost()
<form name="post_form" action="https://www.moneyforfabian.com" method="post"
onsubmit="_gaq.push(['_linkbypost', this]);">
Once you've applied either _link() or _linkByPost(), your site visitors will be tracked across the two domains.
Final thoughts
Everything discussed has been tested and works like a charm. If you come across any problems implementing these techniques drop me a line on twitter @panduuf or drop a comment below.
As always I'd love to hear your thoughts, thanks for reading it and I hope it's useful.
Great first YouMoz Fabian. You have my gratitude... you save me a good amount of time and improved my productivity with your tips and tricks :D
p.d.: in this #searchlove days this post could be a very good aspirant in the main blog #justsayin
I thumbs your comment up, sir!
Thanks Gianluca really appreciated that comment.
Great post Fabian! This is better than Google's training! LOL!
100% agree. Why Google doesn't reveil all the hidden tips and tricks in their training course?
Cindy - I loved that comment, that really cracked me up! :)
max7x - if google wont reveal them i will. plenty more to come...
Great to see you blogging on YOUmoz, Fabian! Congrats!
Thats very handy advice, I will setup the long term and social media tracking immediately.
Thank you for sharing this, I'm sure you have saved many of us quite some time!
I agree--a client just paid for a social media campaign from another consultant and I'm totally tracking the ROI on that baby:) Thanks, Fabian!
Great post Fabian!
Would you consider appending ".com" to your social channels that you're segmenting? In the past, I've seen domains that include "facebook" or "twitter" in the domain name, and as a result, gets picked up by a regular expression facebook|twitter. I wrote a post a while back about segmenting social media traffic in Google Analytics and wonder if you have any input on that.
Hi Jackson, that's a great point & post, Im seeing that in some client data as well
(Fabian is away for a few days so I thought Id jump in for him.)
S
Thanks for the direct straight forward The main GA segmentation without giving much over-information which in many cases may create doubts but in your case..it's not confusing but easy to grasp...! I liked the Goal setup for two different paths leading to same page!
Great post Fabian! Cross-domain tracking can be a tricky thing because it's easy to miss a link or form in a complex website while tagging them with _link() and _linkByPost().
You could do this automatically using jQuery selectors to append the _link() and _linkByPost() functions to all hrefs and forms pointing towards your other domain. This way each page within your site can still get the same trackingscript. Let me know if anyone is interested in a sample jQuery script and I'll post it.
Hi
Sounds like a good youmoz post :) I dont think Ive seen much on the practicalities of cross domain tracking. If you have exampls that would be awesome
S
Hi Stephen, I just wrote my first youmoz post on cross domain tracking and it's up for review. Should probably be up there within a few days.
Great post, Fabian!
I hope you will continue contributing the SEOmoz community with awesome post like this. Never stop, we'll be waiting for you.
Thanks Sergio really appreciate that comment, much much more to come!
Awesome post Fabian!
Thanks so much for sharing all of these - the whole post is like a "Ready Reckoner" for getting great data.
An outstanding effort for your first Youmoz!
Sha
Kind words Sha, thank you - Fabian's just pottered off on a well deserved holiday. I know he'll be made up when he sees your comments :-) Thank you (feeling proud of my team :-))
Congratulations on your first YOUmoz - Incredible post Fabian, thank you! :)
I agree, it's a really good valuable post, well done Fabian :-)
Thanks for this wonderful tips Fabian, specially cross domain tracking is well defined.
Hi mate sweet post, really good tips for every one to easily use for their GA accounts, will have to test out a few of these tomorrow at work =)
Thanks James, big fan of your blog posts as well.
Have bookmarked this for later reference. Had no idea you could do so much with Google analytics
Sweet and easy tips for utilizing and handling advanced segments in Google Analytics is exactly what I needed. Thanks for writing this post up and sharing.
GA is such a powerful tool and it gives you so much data and ways to create reports that times, one can feel overwhelmed.
Like most analysts, segmenting traffic only just begins to help you understand your traffic, how they reached your site, where they are going and how you can better convert to meet your business goals.
Always appreciate these tips and tricks though.
This was absolutely awesome. Thanks for sharing the code to filter expressions of three words or longer!
The real usefulness of segmenting is for determining ROI and what you need to spend to acquire a new customer.
I would love to see a post that brings in the application of cost and conversion and applied it to each segment to demonstrate value.
This post is step 1.
BTW - why is the thumbs up/down at the top of the article not a sum of the comment thumbs up/down?
I clicked on the thumb down thinking it would show who didn't like the article and it counted it instead of bringing me to the comment.
Sorry about that - I did like the post.
Thanks for sharing your knowledge regarding this tips about google analytics
This is great! Bookmarked. +1'd
i was trying to do this last week. thanks what a timing....Non Branded keywords segment
Thank you for this post, it will be a great help
K
A question about the social media segment:
How would you segment traffic from Google+, including facebook, twitter etc.? Wouldn't all google-traffic be included if your source would be "google"?
Congratulations!
I have a question, how can I set Google Plus for Social Media Segment? Something like this?
(plus|facebook|twitter)
Thank you!
Ricardo Martins
If you are using REGEX for your filtering, then I believe it would go something like this:
plus\.url\.google\.com (go in to your analytics Referral report and search 'plus' and you should find the correct path)
I wrote a post on how to write regular expression for segmenting social media.
Andrew Shotland also wrote a good one up here if you want the full Google Plus URL in your reports; https://www.localseoguide.com/how-to-track-referrals-from-google-plus-in-google-analytics/
Hope that helps.
Thank you Jackson!
If i wanna pick Google Plus traffic and some others social media. Could I use this?
(facebook|twitter|plus)
I read you article, it's a important tip that I'm starting to use, I'll try to use with .com and without .com to see the results.
Yes you can.
Thanks a lot..
These are really cool trick. Anybody can suggest me about javascript library for google analytics. How can i write my custom code for tracking... Please help..
I am new to the GA consultant world and I am wondering what tips I can get to help my website design clients that are easy for every day "novice" users. My goal is always to "kick a client out of the nest" and allow them to do their own tracking/SEO.
Thank you.
Hi Fabian
Great article, really pleased I found it. A question I have is, I have setup 3 regex within my GA for 2, 3 and 4 long tail keyphrases as you described in your article.
When I view the Goals section of GA it clearly shows the goals achieved however it doesn't seem to show which long tail phrases were used to achieve those goals. Is there a way I can quickly find this information?
Many thanks.
Kris
Nice post Fabian! It looks like as a Analytics tutorial.
Thanks Fabian,
I'm still an analytics n00b but this will speed up my learning curve.
Will these work with new Google Analytics?
Yes these work in new analytics
Excellent tips and tricks sharing here and Still i do't aware of it but After read entire post, I inspired to utilize all thing in my google analytics account..Thanks
Excellent post!!! I have just been applying these to GA. Can't wait to get stuck in and see what little nuggets of information I can find.
Thanks
Great post. I am going to have to sit down for some time and really put my mind around the advanced functionality of GA. Its always wonderful when a fellow internet marketing pro helps out with a post on the wonderful SEOMOZ : ]
Great post Fabian - in particular the multiple goal conversion tracking resonates with me ;)
I thought you'd like that one mate!
Excellent content!
I am relatively new to the SEO community and lacking on my anayltic abilities. I have +1'd this article for future trial and I am hoping that you can recommened a good starting point for diving into this subject. I have a Google analytics account that tracks a personal website and have been exploring Google's 101 resources which has given me a basic understanding but I am thirsty for more.
Any suggestions?
A good place to start is the Conversion University presentations.
https://www.google.com/support/conversionuniversity/
They explain the basics and work up slowly through the features of Analytics and the basics of how to use them.
If you are feeling up to it after that, there is an exam to get Google Analytics certification too. Not essential but another "trust" metric really for winning business.
Beyond that, check out Avinash Kaushik's blog (Occam's Razor) and books on Analytics.
will definitley check them out, thanks for the reply.
Great post... I did not realize you could use regular expressions in GA. GREAT!!!! This will open up a lot of doors!!
Great post!
Thanks!!!!
Martin
Fabian, thank you! I don't think I've enjoyed going through an analytics tuttorial as much as I have for yours. Clear directions and just fantastic insight. My only issue is now I have alot of data to go through :)
-David
Thanks David for the nice comments.
Don't forget to setup event tracking and custom variables. They can make your life so much easier!
Thank you! I've just applied these to my GA account. The non branded keywords segment is great for realising what effect SEO is really having in trafic volume.
I would be interested to hear other segements that users find useful :)
Great post! I do have a short question though.I was trying to set up 2 keyword segments: fat head with 1 or 2 words and longtail consisting of 3 or more keywords.
The RegExp you mentioned in part 1
^\s*[^\s]+(\s+[^\s]+){2}\s*$
seems to track only keywords with exactly 3 words, not 3 or more...am I missing something ? What do I have to change ?
Besides that: awesome post :-)
From Frank and Ugo at OrchidBox ^\s*[^\s]+(\s+[^\s]+){2,}\s*$
This works for me now at 3 and more. Try it and let us know your milage ;)
Cheers
S
Thanks Stephen. Using your version (with "2," ) works like a charm. TY
Ah hah, very efficient. I've had a few of these (branded terms, social) but I'm adding your longtail regex segment presently!
Thank you kindly sir, and good job on your first YOUmoz post!
That was great, sure appreciate the blog on this topic. I found the advanced segment portion to be the best for me, but will try the other portion possbily when necessary. I really on have one question on the advance segement portion. As far as the branding goes, are you suggesting this is a good way to filter out your own business name in searches or could it be used as a type of filter to filter out other business names? Because when I tested for my own business name it showed a registered visit but showed other keywords as visits as well. Could you iterate on this a tad more, I must not have grab the concept completely on this one. Ovall great writing.
Interesting post! Especially the cross domain tracking was a something that make me excited as i am currently working for a website that contain a 3rd party payment integration system!
Very timely post! Thanks!
Hi moosahemani,
Most of the time 3rd party payment systems don't allow you to put your trackingcode into the pages on their domain. You could tag the return url from the payment provider back to your order process complete page with ?utm_nooverride=1 which makes sure that your payment provider isn't seen as the referrer of all your sales.
Alternatively you could extend your trackingcode with the following line: _gaq.push(['_addIgnoredRef', 'www.example.com']); where you replace www.example.com with the referrer url of your payment provider.
I found this to be very helpful. I have implemented the social media and long tail portions and see where I can increase efforts already.
Hi Fabian this is really Interesting to me. Definitely I will utilize your tips & Tricks. Thanks for the great Post
AWESOME post @Fabian!! Great info all around!
Awesome post Fabian! all great stuff and I have implemented many of these thanks again and I look forward to more of your post here at YouMoz.
Awesome post Fabian!
I love your tips and tricks. Especially love the long tail keywords segment.
Yes I gree with you! Great Information. You explanation is excellent and clear. I was impressed with this post and am looking for this type information. Thanks for Sharing.
Is it still considerd benificial to edit the GATC to allow the # for GA campaign URL's? More info:https://code.google.com/apis/analytics/docs/gaJS/gaJSApiCampaignTracking.html#_gat.GA_Tracker_._setAllowAnchor
splendid post