In this part of the article I will explain how you get server-side information into client-side statistics and vice versa.
- Part 1: What is the difference between server-side and client-side
- Part 2: How to combine server- and client-side webanalytics (this article)
Part 2: How to combine server- and client-side webanalytics
Communication from server-side to client-side
Server-side information in Google Analytics
Just a few examples of server-side data that you might want in Google Analytics or other client-side web analytics programs.
- Your internal client ID.
- Real e-commerce sales.
So how do you get it there?
Your internal client ID
If someone is logged in to your system you can identify that visitor, but how do you get that data in your Analytics report? … Lets say you have a variable $strClientID. You can enter it as the Google Analytics “user defined” variable by doing the following:
_uacct = "UA-000000-0";
__utmSetVar(‘<?php echo $strClientID;?>’);
Real e-commerce sales
When you enable e-commerce tracking in Analytics you can communicate every product and every transaction to Google.
Look at this text file to see how it is done.
For more information look at
The only drawback is that I’d recommend using a separate profile because all visits are logged on the IP address of your hosting provider. In analytics software “Webtrends” I did the same and then you can enter the IP and data of the client provided by your own PHP script.
Summing it up
I’d recommend on using client-side web analytics tools and server-side support for extra data. This is the most trustworthy to get the data you need to make sound assumptions about your visitors.