Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Search Google站点搜索未将结果传递到Google搜索帐户 请考虑以下事项(问题是,我们的页面上的谷歌搜索结果没有在我们的谷歌分析帐户中注册):_Search_Google Analytics - Fatal编程技术网

Search Google站点搜索未将结果传递到Google搜索帐户 请考虑以下事项(问题是,我们的页面上的谷歌搜索结果没有在我们的谷歌分析帐户中注册):

Search Google站点搜索未将结果传递到Google搜索帐户 请考虑以下事项(问题是,我们的页面上的谷歌搜索结果没有在我们的谷歌分析帐户中注册):,search,google-analytics,Search,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"

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>
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)
正在使用的查询参数:

    <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>
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)
提前感谢您的帮助

通过改变:

action="http://google.com/cse"

<form id="cse-search-box" name="srchfrm" action="http://google.com/cse" target="_blank" onsubmit="validatesearch()">

要重定向到网站内的页面,这解决了问题

工作代码:

<div style="float:right; margin-right:12px;">
    <form id="searchbox_99999999999999999999:srraaaaaaaa" name="srchfrm" action="/search" target="_self" onsubmit="validatesearch()">
        <input value="99999999999999999999:srraaaaaaaa" name="cx" type="hidden"/>
        <input id="q" name="q" autocomplete="off" type="text" onKeyPress="return submitenter(this,event)" placeholder="Search"/>
        <input name="ie" value="UTF-8" type="hidden"/>
        <a href="javascript:;" onmouseover="MM_swapImage('go','','/btn_go_on.png',1)" onmouseout="MM_swapImgRestore()" />
        <input type="image" src="/btn_go.png" alt="Go" width="20" height="21" border="0" align="top" id="go"/> 
    </form> 
</div>

根据谷歌文档,搜索页面本身有以下代码:

负责人:


(功能(){
变量cx='999999999999999:srraaaaaaaa';
var gcse=document.createElement('script');gcse.type='text/javascript';gcse.async=true;
gcse.src=(document.location.protocol=='https:'?'https:':'http:')+
'//www.google.com/cse/cse.js?cx='+cx;
var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(gcse,s);
})();
正文:



好的,一个明显的问题是:你确实在GA中设置了搜索跟踪,对吗@EstoyOcupado是的,所有帐户方面都已设置。打开功能并设置查询参数…等等。