Applies to: Server Log analysis
Well. Last week’s post on this same topic certainly created a nice fuss. Thanks everybody.
We received a question about how to do it if your raw data is server logs instead of SDC logs. This post has an answer.
The whole thing, you see, depends on creating a custom measure. In WebTrends, custom measures can be based on two things, either a URL query parameter or a cookie.
If you’re using SDC, every single log file line will, without exception, have oodles of query parameters created by SDC, even if the original URL had no parameters at all (for example /default.html). So when talking about SDC data it was easy for us to pick one at random to build the measure on in our previous post.
In ordinary server logs, on the other hand, there are usually quite a few URLs with no parameters such as the previously mentioned /default.html. There are also a lot of log lines with no cookie. So, in order to build a custom measure the same way as our previous post, we have to get a parameter of some kind to happen in every server log file line.
This can happen by editing the logs (ugh) or modifying your page code (um, no) or … much better … by using CDT Script!
Got that? If not, no worries, just follow the instructions below.
Step 1. Create the CDT script and save it in the CDT Script Storage Place on your WebTrends server.
This happens outside the WT interface, on your WebTrends server. Use a text editor like Notepad or Textpad to create a new file that consists of these lines
[cdt-script] name= WTuno author= The_WebTrends_Outsider version= 1.0 description= Adds parameter WT.uno with value that is always 1 [app/set] var= oneparam:WT.uno value= <1>
Save this new file under the name WTuno.cdt in this location (in the WebTrends program installation directory): ./storage/config/wtm_wtx/cdt/
There are already some CDT files there. Don’t worry about them.
Step 2. Activate this script in the profile where you want it to happen
This, also, is done outside the WT interface and involves editing an existing file on the WebTrends server.
Decide which profile you want to use this in and make a note of its GUID (the gobbledegook string from the first screen when you edit a profile). On the WebTrends server, go to the corresponding *.wlp file (profile configuration file) and open it with a text editor like NotePad or TextPad. The *.wlp files are located here: ./storage/config/wtm_wtx/datfiles/profiles/
With a text editor, open the *.wlp file you want to change. Find the section labeled [cdt] and add this line to the [cdt] section:
hit-script = wtm_wtx\cdt\WTuno.cdt
Save and close the *.wlp file.
That’s it. Go to the other post for the details on making your favorite KPIs into measures, and analyze or re-analyze the profile.
Postscript 1. FYI, “WT.uno” is a name we made up, wanting something short that would also refer to one-ness.
Postscript 2. Yes, you do have to do it profile by profile. As far as we can tell, you cannot just add it to the global wtm_wtx.ini file that contains so many other global settings.
Postscript 3. You might want to change the name or description of the profile you added the CDT script to, so that the name will remind you that the WTuno script is turned on. Or you could add it to the profile description.
Postscript 4. We actually like the CDT approach more than our previously posted method which relies on a text parameter such as the page title parameter, WT.ti. There just is something so kludgey about taking a text parameter and tricking it into turning quantitative. The WT.uno parameter on the other hand is numerical and is a pure clean number 1 every time, and it feels more cosmically appropriate as the basis for a quantitative measure.
- In math, the number 1 is the Multiplicative Identity, after all!
- And 1 appears TWICE in the beautiful beautiful Fibonacci Sequence, and it’s a Lucas Number and a Catalan number too, which is not too shabby in the aesthetics department.
- Sadly, it is NOT a prime number, but at the same time it is the only positive integer that is neither prime or composite.
- And don’t forget that it is half of the entire binary system to which most of us owe our livelihoods.
- It is its own factorial, and factorials are good because they have exclamation points and are therefore exciting, yes-we-did kinds of things.
- It is a square, which is unhip, but it is the only square-free square.
- It’s absolutely, definitely an excellent Starting Point, and these days we need as many starting points as we can get because not enough good stuff gets started at all.
- It is the number you get if you raise any number to the power of 0, which is almost impossible to wrap your mind around, which makes it good for the soul.
- It is NOT a Google number! Who knew?
- In the math geek world, it is classified as a Happy, Lucky, Narcissistic, Powerful, and Practical number.
- It is an Odd number but we’re cool with that and you should be too.
- Curiously, it’s also classified as an Odious number (coincidental to the fact that in some circles it is the symbol for a certain bodily function) but at least it doesn’t go all the way to being an Evil number. I am not making this up.
- In the end, it’s also The Loneliest Number, so isn’t it great that we’re giving it so much company in a log file?
Yes, we like WT.uno=1!
(Thank you to Number Gossip for the Unity Number factoids. Jes’ having fun)