简体   繁体   English

如何在Google Analytics(分析)中跟踪网站搜索,而不将其计为网页浏览量?

[英]How to track site search in Google Analytics and not count as a page view?

I'm using Google Analytics ( analytics.js ) to track site searches on my website: 我正在使用Google Analytics( 分析 )( analytics.js )来跟踪我网站上的网站搜索:

ga('send', 'pageview', '?q=' + search_term);

As you can see I'm using pageview as the hit type. 如您所见,我正在使用综合pageview作为匹配类型。 My problem is, I don't want a new page view to be recorded each time a user performs a search on my site. 我的问题是,我不希望用户每次在我的网站上执行搜索时都记录新的页面浏览量。

Is it possible to track site search and not have each search count as a separate page view? 是否可以跟踪网站搜索,而不必将每个搜索计数都作为单独的页面浏览量? If so, how can this be done? 如果是这样,该怎么办?

Unfortunately, filtering out these Pageviews will stop Analytics from processing them further down its pipeline, which will not allow you to track Search Terms. 不幸的是,过滤掉这些浏览量将阻止Analytics(分析)进一步处理它们,这将使您无法跟踪搜索字词。

You could create a separate View for your Property, which filters out pages whose URL start with ?q= . 您可以为您的媒体资源创建一个单独的视图,以过滤掉URL以?q=开头的页面。

That would allow you to track the Search Terms entered in your website and retain an overview of your website without the "inflated" Pageviews/Virtual Pageviews of search -- I presume you might be using an Ajax Search on your site?. 这样一来,您就可以跟踪在您的网站中输入的搜索字词,并保留网站的概述,而无需进行“夸大的”综合浏览量/虚拟综合浏览量-我想您可能在您的网站上使用Ajax搜索?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Google Analytics跟踪AJAX网站搜索? - How to track AJAX site search using Google Analytics? 如何在Google Analytics(分析)中跟踪表单提交为页面视图? - How to track form submit as page view in Google Analytics? 如何使用PHP在重定向页面上使用Google Analytics跟踪? - How to track with Google Analytics on a redirection page with PHP? Google Analytics网站搜索 - Google Analytics Site Search Google Analytics(分析)使用Codeigniter跟踪搜索 - Google analytics track search with Codeigniter 如何在网络单页应用程序中使用 Firebase Analytics 跟踪页面浏览量? - How to track page view with Firebase Analytics in a web, single page app? 如何使用google analytics在页面重定向之前跟踪事件? - How to track events before page redirect with google analytics? Google Analytics:如何在单页应用程序中跟踪页面? - Google Analytics: How to track pages in a single page application? 为什么Google Analytics(分析)无法通过我的异地订购表单跟踪页面浏览量? - Why won't Google Analytics track page views from my off-site order form? Google Analytics(分析)服务器端授权可获取“页面浏览量”分析数据并将其显示在首页上的随机访问者中 - Google Analytics Server Side Authorization to get Page View Count analytics data and display it to random visitors on the front page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM