This is still a work in process but you get the idea. You can add this code into your Omniture s_code.js file:
the function
function gup( name )
{
if (document.referrer.indexOf(‘google’) > -1){
name = name.replace(/[\[]/,”\\\[").replace(/[\]]/,”\\\]”);
var regexS = “[\\?&]“+name+”=([^]*)”;
var regex = new RegExp( regexS );
var results = regex.exec( document.referrer );
Omniture-Google Keyword Position
This is still a work in process but you get the idea. You can add this code into your Omniture s_code.js file:
the function
function gup( name )
{
if (document.referrer.indexOf(‘google’) > -1){
name = name.replace(/[\[]/,”\\\[").replace(/[\]]/,”\\\]”);
var regexS = “[\\?&]“+name+”=([^]*)”;
var regex = new RegExp( regexS );
var results = regex.exec( document.referrer );
if( results == null )
return “”;
else
return results[1];
}
}
the call
var getSearchPosition = gup( ‘cd’ );
if (getSearchPosition)
s.prop1 = getSearchPosition;