seo

Segmenting Important Data through Advanced Segments

This post is in conjunction with the recent post made by Rand: A Powerful Analytics Tip Every Website Should Employ. Now going one step further, would you be interested in segmenting your traffic data like this:

 

I am sure you would love to. Here ‘segments’ feature in Google Analytics can help you. There are two types of segments in Google Analytics: Default Segments and custom segements.

 

Fig.1

Default segments (like All visits, New visitiors, Returning Visitors etc) are predefined. So all you have to do is select and use them. For our report we will use the following default segments: ‘Paid Search Traffic’, ‘Non-Paid Search Traffic’ and ‘Direct Traffic’. We will also create two custom segments: ‘Social Media Traffic’ and ‘Traffic from referring sites’. I could have used the ‘Referral Traffic’ default segment instead of creating my own  ‘Traffic from referring sites’ segment. But i didn’t. This is becuase the ‘Referral Traffic’ segment also includes traffic from the social media sites which i want to show separately as ‘Social Media Traffic’. So i will exclude the social media traffic from referral traffic when creating my own ‘Traffic from Referring Sites’ segment. Here is what i did to create my chart:

Step1: Login to your Google analytics account and go to the dashboard of your website profile. Click on the ‘All visits’ pull down button next to the text ‘Advanced Segments’ as shown in Fig.1

Note: You won’t see the custom segments like the one you see in Fig.1 as you have yet to create them.


Step2: Click on ‘Create a new advanced segments’ link as shown in Fig.1. You will then see a screen that looks like this:

 

Fig.2

Step 3: We will now create the ‘Social Media Traffic’ segment. So enter the name ‘Social Media Traffic’ in the ‘Name Segment’ text box as shown in Fig.2. Click on the ‘traffic sources’ drop down menu from the left navigation bar and then drag and drop the ‘Source’ metric into the ‘dimension or metric’ work area.

Step4: Now set ‘condition’ of the source to ‘Starts with’ and value to ‘facebook.com’

 

 
Step5: Click on ‘Add “or” statement’ link to add an OR condition. Again click on the ‘traffic sources’ drop down menu from the left navigation bar and then drag and drop the ‘Source’ metric into the ‘dimension or metric’ work area. Now set ‘condition’ of the source to ‘Starts with’ and value to ‘twitter.com’.

 

Fig.3

Step 6: Repeat step 5 for each social media site you wish to track. Here i am tracking traffic from only three sites: facebook, twitter and stumbleupon. You can add as many social sites you like. Once you have added all your targeted sites, click on the ‘Test Segment’ link on the top/bottom right side as shown in fig.3 . In this way you can find out whether your applied conditions (like start with facebook.com) are working or not. 

Fig.4

By clicking ‘test segment’ we can see that 1797 visits came from facebook, 162 visits came from twitter and 1070 visits came from stumbleupon. The 3029 visits at the bottom is the total of all visits from facebook, twitter and stumbleupon. Once you have test your segment, click on the ‘save segment’ button.

Step7: Create a new custom segment and name it ‘Traffic from Referring Sites’. Click on the ‘traffic sources’ drop down menu from the left navigation bar and then drag and drop the ‘Medium’ metric into the ‘dimension or metric’ work area.  Now set the condition of the ‘medium’ to ‘Matches Exactly’ and value to ‘referral’. Click on ‘Add “and” Statement’ link to add an ‘And’ condition.

 

Fig.5

Step 8. Click on the ‘traffic sources’ drop down menu from the left navigation bar and then drag and drop the ‘Source’ metric into the ‘dimension or metric’ work area.  Now set the condition of the ‘source’ to ‘Does not match regular expression’ and set value to ^(facebook|twitter|stumbleupon).com. To understand this regular expression, check the regular expression guide. What this regex says basically is to exclude the facebook, twitter and stumbleupon traffic from your referral traffic. Now test and save your segment. You will now see your segments in the ‘Custom Segments’ list as shown in Fig.1

Step 9:  Go to the dashboard of your website profile. Click on the ‘All visits’ pull down button next to the text ‘Advanced Segments’ as shown in Fig.1. Select ‘Paid search traffic’, ‘Non-paid search traffic’ and ‘Direct Traffic’ from the ‘Default Segments’ box. Click on ‘Apply’ button. You have now applied 4 default segments to your website profile. The fourth default segment is ‘All visits’ which is automatically selected once you select ‘Non-paid search traffic’ segment.

Step10: Open the ‘pageviews’ report and download the pageviews data ‘by day’ (or whatever you prefer) to your excel spreadsheet.

Step11: Go back to the dashboard of your profile and apply your custom segments: ‘Social Media Traffic’ and ‘Traffic from referring sites’. You can apply only 4 segments at a time in Google Analytics, so you have to apply these two additional segments separately. Now again open the ‘pageviews’ report and download the pageviews data ‘by day’ to your excel spreadsheet. Once you have dowloaded all the relevant data and combined them into a single spreadsheet you will see a screen similar to this:

 

Fig.6

Note: I have formatted the Day column. So this will look different in your spreadsheet.

Step12: Create a stacked graph using the data above (click on ‘Insert’ tab in your excel spreadsheet; click on ‘area’ button; select ‘stacked area’; right click on the graph to select data)

 By becoming more creative with ‘Advanced Segments’ you can get report like the one below:

 

Fig.7

Note: You can do the same job through filtered profiles also. But advantage of ‘Advanced Segments’ over ‘filtered profiles’ is that, you can apply them to historical data (which is not possible in case of filtered profiles) and unlike filtered profiles, advanced segments can be applied to all of your accounts and website profiles. If you have a better/faster way to get this data, then please do share in the comments.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button