Track Internal Number of Search Results per search with Google Analytics - google-analytics

This is for a WordPress / WooCommerce setup.
I recently updated my site to Google Analytic 4 and have attempted to setup tracking of search results AND the number of search results per search. I have out-searched Google attempting to find any information on how to set this up...
To be more clear: I have tracking setup to track the search terms users search for and how many times a search term has been searched BUT I'd really like to be able to track how many results are returned when someone searches for something. For example, if someone searches for "Pink Blanket", then I'd like to have a column for Search Results, showing that I have 4 pink blankets for sale on my site.
Why you ask? Let's say over the course of the previous 30 days, I've had 18 searches for "Pinc Blanket" and 32 searches for "Pink Blinket" and 1 search for "Pink Blanke". This would tell me people can't spell correctly and I can use a few of those highly searched terms on my site to return results.
After out-searching Google, I came across this older blog article (https://mixedanalytics.com/blog/number-search-results-google-analytics-gtm/) that does exactly what I want but it's for use with Universal Analytics and not GA4. I tried to set it up for GA4 but no luck as the two versions are quite different. Instead, I reverted back to GA3 / Universal Analytics and attempted the setup but still having issues getting the "Search Results" or the "Avg. Search Results" columns to collect any data:
Does anyone have any idea how to go about doing this?
Ideally, I'd like to get this working with GA4 since Universal Analytics will no longer work come July of 2023.
I feel like this information should be easily obtainable online but perhaps I am not searching for the right answers to my questions.

Related

Google Analytics - Language (not set) & Sharebutton.to

I currently manage quite a few Google Analytics accounts for different websites and am trying to work out how to remove certain Anayltics spam from these accounts. I have previously added filters like excluding Russia visitors as the businesses are local UK based but I am now getting a lot of traffic from:
Language - not set
&
Page - sharebutton.to
If i was to exlucde the above would that get rid of any actual visitors as well as spam or will it get rid of 100% spam?
If someone could help with this that would be brilliant.
Many Thanks
Paul
Filters based on countries or the name of the spam are not efficient because both can be easily changed by the spammers.
Also, it isn't possible to filter the (not set) entries in Analytics, this label is added after the visit is recorded when Analytics doesn't find a value for that dimension.
Instead what you should use
One hostname filter, this will help prevent the majority of the spam, whether it shows as referral, page, language, etc. and independently of the name used by the spammer.
A source filter for the sneaky crawlers which are far less frequent.
Here you will find detailed instructions on how to create the hostname filter and other measures you can take to prevent fake traffic.

Universal Google Analytics - grab some statistics to your own site

I am looking for a way, how can I grab some statistics from Google Universal Analytics to my site? Is there any way to display users statistics on site, grabbing from Analytics like below?
Example:
Users today: 10
Week: 70
Month:270
Total: 1500
I found a couple of information from Google, but was not suitable to this topic. All finding results were about old Google Analytics( without upgrading to Universal) and were displaying all statistic results, including Charts.
You can us the Google analytics API to get the stats you are looking for. You will probably end up doing 3 different requests, because of the fact that the request is made by dates. You will have a problem getting the correct count for Today and yesterday, because the Google Analytics data hasn't finished processing yet it normally takes 24 - 48 hours for the numbers to be correct.
Becouse of the fact that you are only looking to see your own data I recommend you look into using service account for authentication.

Google analytics: how to count occurrences of each item in internal search listing

In company I am working on a website that presents users' announcements. Announcements can be searched through our internal search engine. SO far we have implemented Googla Analytics API to present our users 'pageViews' information of their announcement, but they also want to know how often their announcement has been shown in search listing (probably to compare with pageviews and later modify some information like title or thumbnail of announcement to gain CTR). How can we collect such data? I obviously tried to google it, but couldn't find any information.

How to filter all Google Analytics reports for a specific search term

I'm trying to create a filter on a Google Analytics profile. I'd like it to include only traffic that has come as a result of searching for a specific search term.
For example, imagine I'm interested only in people who have arrived at my site having searched for the word 'dog'. I don't care about any other visitors, so I want all my reports to be filtered for people who have searched for 'dog' to get to the site.
I have tried this a few ways, but I'm not convinced they're working. My latest attempt was the following:
Edit filter
Filter type: Include
Filter field: Referral
Filter pattern: (\?|&)(q|p)=.dog.([^&]*)
Case sensitive: no
At the moment, this appears to be letting through traffic that has not come from a search engine. It would be great if someone could explain what I need to do to get it to work correctly!
Many thanks,
Katie
[P.S. I realise this may sound like a strange request, but it's partly to help me learn a bit more about filters]
Add another Include filter where medium=organic
You could also do it using Advanced Segments instead of requiring to setup a new profile for each keyword :-)

Possible Google Analytics Bug - Traffic Sources Total Visits not matching Total Visits in other reports

Has anyone else seen this issue?
As of roughly 2 weeks ago, I get conflicting figures for the Total Visits metric between the Traffic Sources report and the other reports (e.g. Visitors, Dashboard). For example, for the week of 5/9/2010 through 5/15/2010, the Dashboard and Visitors reports both say 386 Visits. The Traffic Sources report says 157 Visits, and the 4 main source types (Search, Direct, Referral, Other) sum to 157 Visits, not 386.
Any ideas? Is this a known bug, or could there be a configuration issue?
Thanks.
Well it seems that quite a few GA users have observed unaccounted-for behavior, particularly during the past couple of months.
For instance,
18 - 19 May 2010:
more than 40 different GA users posted to the GA
User Forum all regarding the same
issue: no data whatever was
recorded in their GA Accounts
during the 18th and 19th of May. No
response from Google and nothing in
the GA Blog. Several users who had
other GA accounts that were functioning normally during this period, suggested that the problem might be caused by recent changes by Google to the GATC (which was in fact recently revised)--many of those who posted on the Forum said that indeed they had recently added the latest version of the GATC to their Sites/Pages.
6 - 9 May 2010:
Over 50 GA users reported, by
posts to the GA Forum, a complete
GA outage during the period 6 - 9 May
(no data appearing in their reports
for at least one of those days). This
time a GA Team member did respond with
a one-line response "there was a
delay in reporting, no data was lost."
This post also referenced a Twitter
message 4 from GA stating the same
thing.
In addition, i've seen a half dozen, perhaps more, recent posts (past 60 days) on the GA Forum in which users reported significant discrepancies between an aggregate figure and the sum of the constituents--both sets of figures from the same Report, e.g.,
Numbers Don't add up on the Absolute Unique Visitor's Report
Search Engine drill-down visitors don't match total
Neither Post was answered (either by the GA Team or anyone else).
Finally, since it's just a matter of clicking a menu and selecting a different option, i suggest comparing the figures you recited in your question with the analogous figures for Page Views, which is probably the simplest measurement in client-side analytics ("Visits" by contrast is strongly influenced by user cookie manipulation).
Through some trial-and-error looking at every specific source, I've traced the error to one item: within the Traffic Sources reports for the affected days (the issue seems to have partially righted itself as of yesterday's data, at least for my account), the delta/error/black hole was always equal to the Google CPC Search traffic for that day.
I have no idea what's causing the issue, but at least I know how to manually attribute the numbers. Hopefully Google has fixed this...
Thank you to all who commented/answered. I appreciate it.

Resources