{"id":16147,"date":"2024-01-16T08:33:12","date_gmt":"2024-01-16T00:33:12","guid":{"rendered":"https:\/\/www.kickads.co\/?p=16147"},"modified":"2024-01-16T08:33:12","modified_gmt":"2024-01-16T00:33:12","slug":"event-tracking-via-google-tag-manager-and-google-analytics","status":"publish","type":"post","link":"https:\/\/www.kickads.co\/en\/event-tracking-via-google-tag-manager-and-google-analytics\/","title":{"rendered":"Event Tracking Essentials with GA4 and GTM: Understanding User Behaviour"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Before diving in, I recommend reading my article on <\/span><a href=\"https:\/\/www.kickads.co\/en\/google-analytics-4-ga4-essential-guide\/\"><span style=\"font-weight: 400;\">GA4 Guide<\/span><\/a><span style=\"font-weight: 400;\"> first. With a solid understanding of GA4, you&#8217;ll find this article much more helpful.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As mentioned in my previous GA4 article, GA4 is a web tracking tool that focuses more on Event-Based tracking. This is different from the traditional focus on page views. GA4 pays more attention to tracking specific and meaningful actions, or &#8216;events&#8217;, that visitors take on your website.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This article will guide you on how to use GA4 and GTM to track all the interactions visitors have on your website. From basics to advanced, we&#8217;ll step by step reveal how to fully leverage these powerful tools to enhance your website&#8217;s performance and user experience.<\/span><\/p>\n<h1><strong>Event Type in GA4<\/strong><\/h1>\n<p><span style=\"font-size: 1rem; color: var(--ast-global-color-3); background-color: var(--ast-global-color-5);\">In GA4, events are divided into four main categories:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Automatically Collected Event<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Enhancement Measurement Event<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Recommended Event<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Custom Event<\/span><\/li>\n<\/ol>\n<h2><strong>#1 Automatically Collected Event<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">GA4 automatically tracks some basic events. You can see <\/span><a href=\"https:\/\/support.google.com\/analytics\/answer\/9234069\"><span style=\"font-weight: 400;\">a list of these automatically tracked events<\/span><\/a><span style=\"font-weight: 400;\">. If the event you want to track is included in this list, you don&#8217;t need to set up anything.<\/span><\/p>\n<h2><strong>#2 Enhancement Measurement Event<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">In my GA4 tutorial article, I have mentioned how to enable Enhancement Measurement Event Tracking. I won&#8217;t repeat that here. In short, when Enhancement Measurement Tracking is enabled, GA4 automatically tracks the following events:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Scroll (event name: scroll)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Outbound link click (event name: click with the parameter outbound: true)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Site search (event name: view_search_results)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Youtube Video Engagement (events: video_start, video_progress, video_complete)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">File Download (event name: file_download)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Page view (event name: page_view)<\/span><\/span><\/li>\n<\/ul>\n<h2><strong>#3 Recommended Event<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">You can also set up events for tracking and data analysis based on different industries. Google provides <\/span><a href=\"https:\/\/support.google.com\/analytics\/answer\/9267735?hl=zh-Hant&amp;sjid=14462203367021579156-AP\"><span style=\"font-weight: 400;\">recommended events<\/span><\/a><span style=\"font-weight: 400;\"> specific to various industries.<\/span><\/p>\n<h2><strong>#4 Custom Event<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">If the event you want to track is not mentioned in Automatically Collected Events, Enhancement Measurement Events, or Recommended Events, you can create a Custom Event.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Speaking of custom event tracking, let&#8217;s consider a common example in Hong Kong: tracking when a visitor clicks on the WhatsApp button to start a conversation directly with me on WhatsApp.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For instance, let&#8217;s take this website as an example: <\/span><a href=\"http:\/\/taklunc102.sg-host.com\"><span style=\"font-weight: 400;\">taklunc102.sg-host.com<\/span><\/a><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-22392\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking1.png\" alt=\"EventTracking1\" width=\"1600\" height=\"794\" \/><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">When you click on &#8220;Event Tracking \u6559\u5b78&#8221;, you will be redirected to the following URL.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-22393\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/Eventracking2.png\" alt=\"\" width=\"1600\" height=\"67\" \/><\/span><a href=\"https:\/\/api.whatsapp.com\/send?phone=85260836213\"><span style=\"font-weight: 400;\">https:\/\/api.whatsapp.com\/send?phone=85260836213<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">If you want to track this event, you need to set up your Google Tag Manager (if you&#8217;re not familiar with Google Tag Manager, you can read my <\/span><a href=\"https:\/\/www.kickads.co\/en\/google-tag-manager-fundamentals\/\"><span style=\"font-weight: 400;\">GTM Fundamentals<\/span><\/a><span style=\"font-weight: 400;\"> to understand some basic concepts).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There are countless ways to create custom events, and the following is just one example.<\/span><\/p>\n<h3><strong>Tracking Whatsapp Button Click<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Following the <\/span><a href=\"https:\/\/www.kickads.co\/en\/google-tag-manager-fundamentals\/\"><span style=\"font-weight: 400;\">GTM Fundamentals<\/span><\/a><span style=\"font-weight: 400;\">, first, create a Google Tag Manager account. You should see a screen similar to the one described.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-22394\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking3.png\" alt=\"EventTracking3\" width=\"1351\" height=\"603\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Before creating your first Tag, you need to enable Built-in Variables in GTM. You must click on &#8220;Variables&#8221; on the left side, then press &#8220;Configure&#8221;.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22395\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking4.png\" alt=\"EventTracking4\" width=\"1600\" height=\"655\" \/><\/span><span style=\"font-weight: 400;\">Scroll Down, Select All Clicks Elements<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22396\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking5.png\" alt=\"EventTracking5\" width=\"624\" height=\"299\" \/><\/span><\/p>\n<p>Return to the Dashboard again, select &#8220;Tags&#8221; from the left-side menu, and then click &#8220;New&#8221; on the next screen. To create your first Tag, you need to name it in the field at the top of the screen<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22397\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking6.png\" alt=\"EventTracking6\" width=\"1147\" height=\"597\" \/><\/p>\n<p><span style=\"font-weight: 400;\">After naming the Tag, click on the first box to choose the Tag Type. Then, select Google Analytics from the pop-up window on the right, followed by choosing Google Analytics: GA4 Event.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22398 size-full\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking7-e1705641052537.png\" alt=\"EventTracking7\" width=\"1600\" height=\"1077\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Please enter your Measurement ID in the Measurement ID field (refer to the <\/span><a href=\"https:\/\/www.kickads.co\/en\/google-analytics-4-ga4-essential-guide\/\"><span style=\"font-weight: 400;\">GA4 Guide<\/span><\/a><span style=\"font-weight: 400;\"> to know where to find it). The event name is customizable; in this case, I set it as &#8220;Whatsapp_Click&#8221;. After setting it up, click Save in the top right corner.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22399\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking8.png\" alt=\"EventTracking8\" width=\"1600\" height=\"960\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Then Add Trigger<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22400\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking9.png\" alt=\"EventTracking9\" width=\"1600\" height=\"809\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Click the &#8220;+&#8221; button in the top right corner.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22401\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/Eventracking10.png\" alt=\"Eventracking10\" width=\"1600\" height=\"299\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Rename it to &#8220;Whatsapp_Click&#8221; (you can name it whatever you like, as long as you can recognize it), then click on the pencil icon in the top right corner.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22402\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking11.png\" alt=\"EventTracking11\" width=\"1600\" height=\"602\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Select \u201cJust Links\u201d<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22403\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking12.png\" alt=\"EventTracking12\" width=\"1600\" height=\"634\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Select &#8220;Some Link Clicks&#8221; and set the filter to Page URL contains &#8220;85260836213&#8221; (why this number? Because according to the example I gave you earlier, when you click to contact us via WhatsApp for a free quote, you are directed to the following URL: <\/span><a href=\"https:\/\/api.whatsapp.com\/send?phone=85260836213\"><span style=\"font-weight: 400;\">https:\/\/api.whatsapp.com\/send?phone=85260836213<\/span><\/a><span style=\"font-weight: 400;\">. The unique part of this link, compared to other links, is this phone number. Therefore, we use this condition to set up the event. Finally, click Save.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22404\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/Eventtracking13.png\" alt=\"Eventtracking13\" width=\"1440\" height=\"593\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Click &#8220;Preview&#8221; in the top right corner.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22405\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/Eventtracking14.png\" alt=\"Eventtracking14\" width=\"1600\" height=\"674\" \/><\/span><\/p>\n<p><span style=\"font-size: 1rem; color: var(--ast-global-color-3); background-color: var(--ast-global-color-5);\"><br \/>\nEnter your website URL. Please ensure that your website has successfully installed the relevant GTM Code.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22406\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/Eventtrackin15.png\" alt=\"Eventtracking15\" width=\"1600\" height=\"674\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Your website will appear, and you should look for &#8220;Tag Assistant Connected&#8221; in the bottom right corner. If you see it, you have successfully entered Preview Mode. Click on &#8220;Event Tracking Tutorial&#8221; again.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22407\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16.png\" alt=\"EventTracking16\" width=\"1600\" height=\"780\" srcset=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16.png 1600w, https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16-300x146.png 300w, https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16-1024x499.png 1024w, https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16-768x374.png 768w, https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16-1536x749.png 1536w, https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16-18x9.png 18w, https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/EventTracking16-480x234.png 480w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Check your Tag Assistant, if you see &#8220;Whatsapp_Click&#8221; under &#8220;Tag Fired,&#8221; you have successfully created that event.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22408\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/Eventtracking17.png\" alt=\"Eventtracking17\" width=\"1600\" height=\"693\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Don&#8217;t forget to click &#8220;Submit&#8221; in Google Tag Manager; this is when the event setup is officially published!<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22409\" src=\"https:\/\/www.kickads.co\/wp-content\/uploads\/2019\/12\/Eventtracking18.png\" alt=\"Eventtracking18\" width=\"1600\" height=\"693\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before diving in, I recommend reading my article on GA4 Guide first. With a solid understanding of GA4, you&#8217;ll find this article much more helpful. As mentioned in my previous GA4 article, GA4 is a web tracking tool that focuses more on Event-Based tracking. This is different from the traditional focus on page views. GA4 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":22416,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,71],"tags":[83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"class_list":["post-16147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-analytics","category-google-tag-manager","tag-event-tracking","tag-event-tracking-google-analytics","tag-ga-events","tag-google-analytics-event-tracking","tag-google-analytics-event-tracking-tutorial","tag-google-events","tag-google-goals","tag-google-tag-manager-click-element","tag-google-tag-manager-click-tracking","tag-google-tag-manager-custom-event","tag-google-tag-manager-event-tracking-button-click","tag-google-tag-manager-event-tracking-data-layer","tag-gtm-non-interaction-hit","tag-how-to-track-user-clicks-on-website","tag-setting-up-event-tracking-with-gtm","tag-track-form-submission-google-tag-manager","tag-using-google-analytics-event-tracking"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/posts\/16147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/comments?post=16147"}],"version-history":[{"count":0,"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/posts\/16147\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/media\/22416"}],"wp:attachment":[{"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/media?parent=16147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/categories?post=16147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kickads.co\/en\/wp-json\/wp\/v2\/tags?post=16147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}