Google SEO integration
From ClickTale Wiki
The instructions on this page are intended for self service and online accounts.
Enterprise customers should contact their account managers for integration support.
Ever wonder which words lead visitors to your site? Using this method you can find out how many pageviews you got for each keyword, as well as how the visitors searching for those keywords behaved:
Instructions
Place the following code on your website, instead of the bottom part of your tracking code:
<!-- ClickTale Bottom part --> <div id="ClickTaleDiv" style="display: none;"></div> <script type="text/javascript"> function queryString(parameter, encoded) { var loc_search = location.search.substring(1, location.search.length); loc_search = loc_search.replace(/\+/g, ' '); var param_value = false; var params = loc_search.split("&"); if(!encoded) { parameter = encodeURIComponent(parameter); } for (i=0; i<params.length;i++) { param_name = params[i].substring(0,params[i].indexOf('=')); if (param_name == parameter) { param_value = params[i].substring(params[i].indexOf('=')+1) } } if (param_value) { return param_value; } else { return false; // case parameter wasn't found } } </script> <script src="http://s.clicktale.net/WRb.js" type="text/javascript"></script> <script type="text/javascript"> if (document.referrer. match(“www.google.com”) != null) { var search_string = queryString("q"); var search_words = search_string.split("+"); for (i=0; i< search_words.length;i++) { ClickTaleTag("googlesearch:"+search_words[i]); } } if(typeof ClickTale=='function') ClickTale([!YOUR PROJECT ID!],recordingratio,[!PARTITION!]); </script> <!-- ClickTale end of Bottom part -->
This tags the pageviews with a tag entitled “googlesearch:”+the term that was searched.