Regex or Regular Expressions in Google Analytics Custom Reports

Regular expressions, or regex for short, is a string of text used to describe a search pattern. In simple terms, it is find and replace on steroids. In this specific example, we are not replacing anything. There are a ton of applications ranging from parsing data on a web server to manipulating high volumes of text files to what makes SEO permalinks possible on Linux servers, which is done using Apache’s mod_rewrite by editing the .htaccess file. In Google Analytics, you can create Custom Reports using regular expressions to build customized reporting views that allow you to get to the data that you want in the format that you want it presented. I will show you how.

To keep things simple, I will use the example that I want to build a Custom Report to see the traffic coming from Facebook. Traffic from Facebook generally comes in from facebook.com, m.facebook.com, l.facebook.com and lm.facebook.com. The l.* and lm.* are part of their Link Shim release in 2008, which helps protect Facebook users from malicious URLs.

Custom Reports Basics
To create a Custom Report, click on the Customization tab on the top and then click the “New Custom Report” button.

I gave mine the title of “Facebook Traffic” and left the report Name the default. Under Metric Groups, I added “Users”, “New Users”, “Sessions”, “% New Sessions”, “Pageviews” and “Avg. Session Duration”. Under Dimension Drilldowns, I added “Source / Medium”, “Full Referrer” and “Landing Page”. You can change the metrics and dimensions to the ones that you want to see but for this purpose, you can use the ones that I have used to make it easier on your end. If you click on Save, you will see all traffic—I will show you below several methods to filter out just traffic from Facebook.


Google Analytics Custom Reports

Go back to Customization, and under the Actions dropdown, click on Edit. Under “Filters – optional”, click on “add filter” and select Source (under Acquisitions).
Continue reading “Regex or Regular Expressions in Google Analytics Custom Reports”

How to Find Out Competitors’ Website Traffic

Do you want to get a traffic estimate of your competitors? This would give you a broad understanding of where your website stands in contrast to your competition. It would also be beneficial to get a website traffic estimate for any websites you plan to enter an advertising or link exchange partnership. This would serve as a research tool to verify the traffic they are reporting to you.

Here are two websites that I recommend:

  1. Site Worth Traffic
  2. Similar Web

I ran a test across a series of websites where I have Google Analytics access and generally speaking, Site Worth Traffic reflected more accurately whereas Similar Web was more liberally. However, with a small fraction of the websites that I tested, the estimated traffic readings were way off on both sites so use these tools with a grain of salt.

I would also recommend cross referencing the traffic estimates with the website’s Alexa Rank. Alexa.com does not provide a traffic estimate but a ranking system in relation to other websites across the web where the higher the rank number, the more traffic they probably get. For example, if someone says their website gets 5 million a month but has an Alexa Rank of over 1 million, then you know they are full of it.

Similar Web

Continue reading “How to Find Out Competitors’ Website Traffic”

HTTPS for SEO Tips

What is HTTPS? It stands for Hyper text Transfer Protocol Secure and is the secure variation of HTTP, which is the protocol you use to browse websites. HTTPS adds a layer of security by encryption all of the data transferred between you and the website. Unlike many other factors pertaining to influencing organic SERP rankings, this one has been officially confirmed as a ranking signal by Google.

My Tips:

  • Keep realistic expectations. Implementing SSL will not sky rocket your SERP rankings. Personally, I am skeptical the influence will be significant.
  • If you are doing this for the SEO brownie points, go with something economical such as Rapid SSL or Comodo SSL
  • Add the HTTPS version of your domain name to Google Webmaster Tools by using the standard “Add a site” button and typing https://yourdomain.com
  • Change absolute paths that reference to HTTP to relative paths. Otherwise, you may get SSL warning errors telling you there are unsecured items on your page.
  • After you have moved your website to SSL, Google recommends that you use the Qualsys SSL Labs tool to verify the status of your HTTPS.

My Tips for Business Owners:

  • Have your web host do the installation for the SSL certificate
  • Have your webmaster change the absolute paths to relative paths, and add the HTTPS version to Google Webmaster Tools

My Tips for Geeks:

  • I prefer to use /folder/file.jpg as oppose to folder/file.jpg when I am referencing files because it references from the root directory of the website so you do not have to worry about references breaking if you use slashes as part of your custom URLs for SEO.
  • If you have iframe or embedded elements, you may want to consider stripping the http: or https: so instead of http://example.com/iframe.html or https://example.com/iframe.html, you would reference to //example.com/iframe.html and this will pull up the same protocol as being accessed from the parent page.

Lastly, why do I think Google wants all sites to have HTTPS?

Accordingly to Google, they want websites to be safer but the problem with that is most websites that have e-commerce or transact sensitive information already have HTTPS. I don’t buy that explanation.

One of the inherent problems with website analytics tracking is search query data cannot be passed from HTTPS to HTTP, and Google Analytics is no exception. That means if somebody is logged into Google, Yahoo or Bing or simply goes to the HTTPS version of the search engines, types a search query and then lands on your website, Google Analytics isn’t able to capture that information. Notice in Google Analytics, sometimes you see “(not provided)” as the Keyword? That is the reason why. By having people to migrate their sites to HTTPS, Google will have access to data that they did not have before.


SSL for Search Engine Optimization