请考虑以下问题(问题是,我们页面上的 Google 搜索结果未在我们的 Google Analytics 帐户中注册):
HTML表格:
<div style="float:right; margin-right:12px;">
<form id="cse-search-box" name="srchfrm" action="http://google.com/cse" target="_blank" onsubmit="validatesearch()">
<input value="999999999999999999999:srraaaaaaaa" name="cx" type="hidden"/>
<input id="q" name="q" type="text" onKeyPress="return submitenter(this,event)" placeholder="Search"/>
<a href="javascript:;" onmouseover="MM_swapImage('go','','/btn_go_on.gif',1)" onmouseout="MM_swapImgRestore()" />
<input type="image" src="/btn_go.gif" alt="Go" width="20" height="21" border="0" align="top" id="go"/>
<input value="UTF-8" name="ie" type="hidden"/>
</form>
</div>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('search', '1');
google.setOnLoadCallback(function() {
google.search.CustomSearchControl.attachAutoCompletion(
'999999999999999999999:srraaaaaaaa',
document.getElementById('q'),
'cse-search-box');
});
</script>
执行搜索的 URL:
http://www.google.com/cse?cx=999999999999999999999:srraaaaaaaa&q=test+search&x=12&y=11&ie=UTF-8&oq=&gs_l=#gsc.tab=0&gsc.q=test%20search&gsc.page=1
正在使用的查询参数:
q
query (I read in another post to try this)
感谢您提前提供的所有帮助!