Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Consolidating Web Analytics Tags to Central Server

Status
Not open for further replies.

chitownclone

Programmer
Mar 30, 2004
22
0
0
US
I manage 8 different websites. Some are tagged with Google Analytics, some Omniture, some WebTrends, some DoubleClick Dart Spotlight, and some have multiple tags. I would like to centralize the configuration and management of all tags on a central server.

Thus, when a vistior lands on one of my sites, the client-side will request a JavaScript file (or engage a php script) from the central server....which then request the appropriate files sitting on Google (urchin.js), Omniture (omniture.js), etc servers.

Questions:

1) Will the analytics applications still be able to track the visitor’s IP address and other server-side data (referral url, browser data, etc) if I am storing their .js files on a Central server (C.S.)? What about the first and third party cookies set by the applications? I know all the work is done client-side, so I don't think any server-side data from the C.S. will corrupted the data or cause a disconnect with setting/getting the cookies.

2) Would there be any of the same problems with server-side data and setting/getting cookies if I used a single php script to manage all the requests via a single web-site id?

3) Lastly, in terms of site performance....would using a php script create a noticeable degradation in load time compared to calling a specific js file on the same server?

Managed Via Single PHP
Code:
<script type="text/javascript" src="[URL unfurl="true"]http://www.central_server.com/analytics.php?site_id=3"></script>[/URL]

Managed Via Local Site Related JS File
Code:
<html>
<BODY>

<A HREF="[URL unfurl="true"]http://www.google.com"[/URL] onClick="javascript:EventTracker('/offsite/google.com')";>Go to Google</A> 


<!-- Consilidated Analytics Tags Start -->

<script type="text/javascript" src="[URL unfurl="true"]http://www.central_server.com/my_local_site_name.js"></script>[/URL]
<script type="text/javascript">
	PageloadTracker();
</script>

<!-- Consilidated Analytics Tags Start  End -->

</body>
</html>

Thanks for the help!!!
 
I would say that this is a bad idea. Contact each vendor directly for their opinion of serving their JS from another host - I would imagine for many this is specifically prevented via the EULA.

Would you be able to access all the data that Omniture can generate currently? Probably not. Would Google Analytics be able to track page impressions? Probably not at all. Others? I dunno. I imagine the same response.

Could it be done? Sure! You would have to reverse engineer a lot of code (which may or may not be legal) first, though!

Maybe you are better off to consolidate your tracking to just one or two vendors, and apply both sets of tracking codes to each site. At the very least you'll only have to go to two places to get the data [smile]

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
I don't think I explained the purpose well enough.

I am not going to touch any of the analytics code that Goolge or Omniture has developed outside of the paramaters that users need to conigure themselves.

Below is a list of the site-level and page-level parameters for Google Analytics. Omniture has similar parameters...but uses different syntax. Furthermore, the urchin.js and omniture.js don't live locally, they live on Google/Omniture's analytics servers.

So all my centeralized server would do is to dynamically populate the custom parameters that would normally need to be hard coded within the body each page of each site.

When the site renders....Goolge, Omniture, etc will still get hit with the same
tag that is stored in their server logs and used as site analytic data.


//-- Urchin On Demand Settings ONLY
var _uacct=""; // set up the Urchin Account
var _userv=1; // service mode (0=local,1=remote,2=both)

//-- UTM User Settings
var _ufsc=1; // set client info flag (1=on|0=off)
var _udn="auto"; // (auto|none|domain) set the domain name for cookies
var _uhash="on"; // (on|off) unique domain hash for cookies
var _utimeout="1800"; // set the inactive session timeout in seconds
var _ugifpath="/__utm.gif"; // set the web path to the __utm.gif file
var _utsp="|"; // transaction field separator
var _uflash=1; // set flash version detect option (1=on|0=off)
var _utitle=1; // set the document title detect option (1=on|0=off)
var _ulink=0; // enable linker functionality (1=on|0=off)
var _uanchor=0; // enable use of anchors for campaign (1=on|0=off)
var _utcp="/"; // the cookie path for tracking
var _usample=100; // The sampling % of visitors to track (1-100).

//-- UTM Campaign Tracking Settings
var _uctm=1; // set campaign tracking module (1=on|0=off)
var _ucto="15768000"; // set timeout in seconds (6 month default)
var _uccn="utm_campaign"; // name
var _ucmd="utm_medium"; // medium (cpc|cpm|link|email|organic)
var _ucsr="utm_source"; // source
var _uctr="utm_term"; // term/keyword
var _ucct="utm_content"; // content
var _ucid="utm_id"; // id number
var _ucno="utm_nooverride"; // don't override
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top