Cool Custom Dimension: Height of the visitor’s browser window, in pixels

Suspicious about content that’s below the viewing fold? Check whether browser window height correlates with conversion or other visit events.

If you’re concerned about part of your page being below the fold, why not check on your suspicions using your site data.

In other words, look for a correlation between your KPIs and the height of the window in which your site is being viewed.

This post is about how to create a custom dimension for the height of the viewing window being used by your visitor.  Note: we’re not talking about the full screen height — we’re speaking of the much more useful height of the viewable window area.

The Webtrends SDC tag collects this information in the parameter (bs stands for something like Browserwindow Size, I suppose).  There is a small problem with — values are recorded as a combination of browser width and height, for example “1200x700.”

If we’re interested in only the height, we need just the second part, after the “x“.  We can pull out just the height using one of the advanced features of dimension configuration that allows us to extract the part after the x.

Here’s how.

Create a new custom dimension definition.

In the General tab:

  • Give it a name (Browser Window Height?  Viewport Height?)
  • Give the report column a name (Height?  Browser Window Height?  Height in pixels?)

In the Based On tab:

  • Value to Base On is “Query Parameter”
  • Parameter Name is “”
  • Click on the “Advanced” button
  • Select the Regular Expression radio button and enter this in the regex field.  This is how the part after the “x” is pulled out and separated:

In the “When to Collect Data” tab:

  • Choose either “first Occurrence in Visit” or “Last Occurrence in Visit” depending on your instincts.  (I use First Occurence)


There’s your custom dimension.  Use it in a report that has your favorite measures – conversions, or perhaps a measure of success in those items that you think are usually below the fold.

For best results in this kind of report, it’s probably a good idea to filter it to remove mobile devices.  Or to include only mobile devices, if that’s your interest.  Mobile users seem have different expectations about the fold and seem to be a lot more likely to scroll down.  At least, that’s what my instance of this report seems to tell me.  Removing mobile users gave me a clearer pattern.

Postscript:  If you want to NOT have thousands and thousands of rows, consider collapsing this lengthy table into collections of rows, a.k.a. buckets.  We wrote a post on dimension buckets, here.






Cool Custom Report: SERP Rank for Your Organic Google Traffic

Google is starting to record the organic rank in its referrer string. It takes about 3 minutes to turn that rank info into a WebTrends custom dimension you can use in any search phrase report.

When somebody clicks on an organic search result item on a Google search results page, the referrer string for the landing page often*** contains the rank of the search listing as it appeared on the Google results page.  So — if theyclick on a #6 position item, the referrer page for the visit will contain a parameter “cd=6” in addition to the normal “q=<search+term>” and other Google info.

***The rank is in the referrer only if the visitor:

  • Is not logged in to a Google account at the time
  • Is not using Safari on iOS 6, or Firefox

If that’s good enough for you, you can turn that “cd=<rank>” string into a custom dimension.

With this dimension, you can make a custom report on keywords where each keyword has a list below it of ranks (1…2…3…), showing the number of visits that came from a listing at that rank.  The “list below it” is, in WebTrends-speak, called a secondary custom report dimension.  The list of keywords would be of course the primary custom report dimension for the report.



It’s pretty easy and actually uses the techniques we described in a recent post about using a subpart of a URL.  (In fact, it was our playing around with the new Google referrer field that led to that other post in the first place.)  In that post, we talked about using a subpart of a URL.  In this post, we’re going to use part of the referrer field.

There are two parts to this.

First, you have to enable the display of referring page query parameters.  This is a simple hack to a config file (if you use the WebTrends software).  The hack is described in this post:

Second, you have to create the dimension.  Set it up as follows:

1.  Create it and give it a name


2. On the next screen, base it on “Referring Page (initial in visit)”.  Using this basis will turn it into a visit-based dimension.  That’s how the WebTrends built-in search phrase dimension works too.  If you want, you can instead base it on “Referring Page (any in visit)” and it will be a hit-based dimension that will act in a different way.  See our post on visit versus hit dimensions for a little more information.

3. Click on the Advanced button to open the subpart dialog.


4.  Activate the Regular Expression button and type in this regular expression:



(what this does is … locates “cd=” then extracts any immediately-following numeral(s), and stops extracting when it hits something that is not a numeral.)

That’s it.  Now it’s up to you to make a new custom report with “Search Phrase” as the primary dimension and this as the secondary dimension.  We suggest NOT checking the box that says “Exclude activity without dimension data” for this new dimension, because it helps to see how incredibly sparse these new referrers are.  We also suggest that you filter out PPC traffic and that you filter-in the referrers.


  • Google is doing this only for organic listings, not PPC.  If you use PPC ads, it would be a good idea to remove PPC traffic from this report.  We talked about identifying PPC traffic in another post with a bit more in yet another post on PPC reporting.
  • We’d love it if you’d bother WebTrends with a feature request about adding the ability to base custom measures on the referrer.  At the very least, they will find out if it’s easy or hard for them to do, should they decide to do it.  We suspect they are already looking into it – give them encouragement.