Cool custom measure column: PPC, email, banner visit counts
You can add a column to your entry page, referrer, or keyword reports that shows how much traffic comes from PPC.
By varying the setup a little, you can do the same thing for email visits. Or banner visits. Or a specific campaign. You get the idea.

We did it with a variation of the KPI measure that we described a couple months ago.
Prerequisite
You must already be using a way to identify the visit type (a.k.a. origin) as PPC, email, etc, in the URL of the visit’s first page view. In other words, the first page’s URL must be something like
“page.aspx?source=email.”
That’s standard practice for analytics so you’re probably already doing it.
WebTrends’ documentation suggests using WT.ev or WT.srch although it’s not a rule, it just makes the data more compatible with some preconfigured reports. We’ll just call it the “visit type identifier.” For example:
WT.ev=e for email traffic
WT.ev=b for banner traffic
WT.srch=1 for paid search
WT.ev=ppc for paid search
WT.mc_id=whatever for any campaign
source=YahooPPC
origin=affiliateXYZ
Whatever you like. It just has to be in the landing page.
Here’s how to build one of these measures, using a PPC example.
- The rough idea of the measure is:
- Count the number of visits in which your visit type identifier is seen in the first hit.
Note to existing fans of the KPI measure trick: There’s a new wrinkle presented here that we didn’t talk about in the other post — the SDC-auto-created parameter WT.vt_f_tlv. (It’s intended to hold “time of last visit” and is set to zero if WebTrends can’t identify a previous visit.) SDC puts this parameter only in the first hit of a visit. Cool eh? It opens a lot of possibilities. You can use a parameter to identify Visit Page View #1. This is so exciting.
Creating the custom measure
Go to Web Analysis >> Report Configuration >> Custom Reports >> Measures and do “Create a New Measure.”
In the opening screen, give it a name and so forth.

In the “What To Measure” tab, enter WT.vt_f_tlv. Skip the Advanced button.

In the “When To Measure” tab, there are two steps. In the first step you specify the URL stem. You’ll allow any URL stem, so you enter an asterisk.

Click on “New URL Parameter” in the lower right to get to the second part of “When to Measure.” This time, you do care about exactly what’s specified. In order to be measured, the hit must have identifier for the type of visit you want to measure. In this case, with our example, the identifier is the parameter “WT.ev” with the value “ppc.” As said above, in your case it can be anything, as long as it identifies a PPC visit.
In doing variations of this measure, for email or banners instead of PPC for example, you’ll substitute an identifier for banner visits. Or whatever.

Close out the New URL Parameter screen and you’ll go back to the main When to Measure screen, and now your parameter will appear in the bottom part of the screen. It should look like this:

Go to the next setup screen, Format. In the Format screen, you want to make sure the numbers appear as integers in your reports.

The next screen shows a summary. Your summary screen should look like this. Save it.

Create the Custom Report
Now you simply need to add this measure to any custom report. By “any custom report” we of course mean “any custom report that’s based on a visit-type dimension like Referrer, Search Term, Entry Page.”
In this screen shot taken from the Measures step of defining a custom report, the PPC Visit measure happens to be the third measure of the report.

Results
And, as we showed at the top of this post, after analyzing you should get a column like this:

Postscript
You can’t do this with server logs, just SDC. SDC adds the magic ingredient, the parameter WT.vt_f_tlv that identifies the first hit of a visit. Without this limitation to entry pages, resulting numbers will be too high because WebTrends will give you a count of all the hits that contain the visit type identifier, including hits occur in the middle of a visit. Since many people back out to a search results page (for example) and re-enter, or they back-button to the page with the identifier, a single visit could get counted more than once in your stats.






12 comments
I’m guessing this won’t work using WT.mc_id if the identifier for email, banner, PPC, etc is obtained by using a field in a translation file.
Translation operations happen really early, so you might be in luck. I know translations happen after global hit filters (meaning the hit filters operate on the untranslated values) but I think translations occur before just about everything else … including custom reports.
Hi
Does anyone here have any idea how to make one dimension out of several parameters?
E.g. if I have the parameters you listed:
WT.ev=e for email traffic
WT.ev=b for banner traffic
WT.srch=1 for paid search
WT.ev=ppc for paid search
WT.mc_id=whatever for any campaign
source=YahooPPC
origin=affiliateXYZ
Any way to do ONE dimension
TrafficSource = email|banner|paid search|ppc|campaign|yahoo|affiliateXYZ?
I know it’s a tough one!
You mean, to have a separate line in the report for every unique combination? With yesses and noes? So an email for campaign AAA on affiliate XYZ would be:
TrafficSource= yes|no|no|no|AAA|no|XYZ ?
Funnily enough, although it seems like a peculiar request to the average person, we (some of the Outsiders) actually do create something exactly like this. With log preprocessing, i.e. a perl script acting on the raw logs and producing new rewritten logs. Sorreee, no can do in WebTrends other than with a custom drilldown, which probably isn’t what you want.
We are going to do a post on preprocessing logs at some point.
Thanks for the answer. I was rather thinking about a dimension giving visits by traffic source, like:
direct: 123 visits
email: 3 visits
banner: 40 visits
paid search: 30 visits
…
But you point out a very true problem, source might not be unique (e.g. banner on affiliate site).
I guess, as you say, preprocessing will be the only option, but this requests to rebuild a search engine reference list to compute organic search traffic, and i bet this will not match with WT’s definition (at least there is the risk that the two references divert at some point…)
Two things.
First, if you really really want that report (as opposed to setting up an Excel spreadsheet to pull the numbers automatically into the list you describe) you COULD try WebTrends’ URL Search & Replace. You wouldn’t get the Direct Traffic line or a line for organic search, but you could work with anything that’s in the first hit’s URL. So, with URL S&R you could change “WT.srch=1″ into “WT.ev=ppc&WT.srch=1″ and “WT.mc_id=” into “WT.mc_id=allmcidcampaigns&WT.mc_id= . And so on. The WebTrends URL Search & Replace only gets used once per log file line, so if you have two of these in one line, you’re out of luck.
I still like the Excel approach.
Anyway, second, if you’re good at preprocessing scripts, why not have your script use WebTrends’ own list of search engines and query strings i.e. the file keywords.ini.
Thanks fo the answers and basically I agree, and if I had had the opportunity, I would have opted for the log processing. I also evaluated the possibility to write a plugin, but documentation is reeeally poor about this, but it would have been optimal since apparently a plugin has even access to same visit search engine information…
Seach and replace is a rare ressource, and I wouldn’t want to miss that option the day something is really only doable with S/R.
So finally, I found a solution by creating a dimension based on Entry Referrer. I have overridden Default String to “Organic” and applied the regexp (WT.mc_id|WT.srch) and then translated the extracted values with a Lookup Table to “Paid referrer” and “Paid Search” respectively.
But still, I’m considering asking WebTrends for support on Plugin development, because this would open up many possibilities.
Log preprocessing scares our System Administrators, because it’s quite resource consuming with our traffic volume (~10 billion PV/year…)
Whoa, that’s pretty creative.
Can you give more details on that?
Dedicated article here: http://wacb.pedia.ch
Including print screen of the resulting pie chart.
Omigosh. We’re going to have to finally start a Blogroll because of your blog. That is GREAT stuff.
Hey,
Simpler solution for “visits from ppc” measure:
What to measure: WT.srch
When to measure: just set it to most recent occurance in visit.
Either count and sum will work as the methods in this case since in theory wt.srch is set to 1.
What do you think?
True! I had forgotten that WT.srch is ready-made for anything based on “1.”
Leave a Comment