Learn how to track your website's internal search function in GA4 (Google Analytics 4). In this video, you will learn how to track your site search using a query parameter, and how you can track what people are searching for within your website if your site search doesn't use a query parameter. We will look at how this can be achieved using Google Tag Manager and by modifying the form that runs your search function. Let's get started!
JUMP TO A TOPIC:
00:00 Introduction
00:42 Site search with query parameters
01:49 Finding your query parameter
02:42 Configuring GA4 with a custom query parameter
04:06 Site search without query parameters
04:42 Using a regex lookup in Google Tag Manager
08:19 Site search without the term in the URL
09:10 Capturing search terms from the page title
13:20 Reporting on site search in GA4
14:24 Conclusion
YOUR EXTRA RESOURCES:
○ GA4 tutorial – https://youtu.be/Xzvn_kBmIRw
○ Google Tag Manager Tutorial – https://youtu.be/_D5nd5SZ4s8
JAVASCRIPT CODE USED IN THE VARIABLE:
function() {
var pageTitle = document.title
var searchTerm = pageTitle.replace(' - Loves Data Demo Site','');
return searchTerm;
}
This video has been dubbed using an artificial voice via https://aloud.area120.google.com to increase accessibility. You can change the audio track language in the Settings menu.
Join our courses: https://www.lovesdata.com/courses
Subscribe to our YouTube channel: http://www.youtube.com/subscription_center?add_user=lovesdata
0 Comments