{"id":1183,"date":"2023-03-26T21:28:35","date_gmt":"2023-03-26T20:28:35","guid":{"rendered":"https:\/\/organicdigital.co\/blog\/?p=1183"},"modified":"2024-06-10T15:00:57","modified_gmt":"2024-06-10T14:00:57","slug":"solved-why-google-tag-manager-events-are-not-showing-in-analytics","status":"publish","type":"post","link":"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/","title":{"rendered":"Solved:\u00a0 Why Google Tag Manager Events Are Not Showing In Analytics"},"content":{"rendered":"\n<p>When wearing my <a href=\"https:\/\/daveashworth.co\/skills\/analytics-and-ad-tracking-consultant\/google-analytics-4\/\">Google Analytics Consultancy<\/a> cap, I often seeGoogle Tag Manager events not showing in Analytics is a common issue experienced by many website owners. In this situation, the events that are set up in Google Tag Manager do not appear in the Analytics reports. This can be frustrating as it hinders the ability to track and analyze user interactions accurately. There are several potential reasons for this problem. One possibility is that the event tags are not properly configured in Google Tag Manager, leading to the events not being triggered and recorded in Analytics. Another reason could be that there is a delay in data processing, and it may take some time for the events to show up in the reports. Additionally, if there are any filters or data sampling applied in Analytics, it could affect the visibility of the events. To resolve this issue, it is recommended to double-check the event tag setup in Google Tag Manager, ensure that the tags are firing correctly, and review any filters or settings in Analytics that might be causing the events to be hidden. By troubleshooting these potential causes, website owners can gain accurate insights into user behavior and make informed decisions based on reliable data.<\/p>\n\n\n\n<p>I recently worked on a <a href=\"https:\/\/daveashworth.co\/skills\/google-tag-manager-consultant\/\">Google Tag Manager (GTM)<\/a> and Google Analytics 4 (GA4) configuration project for a new website product launch.\u00a0\u00a0 This was across two subdomains on the same top level domain, both of which already had GTM tags with a GA4 basic page view tag set up, along with a number of Universal Analytics events.<\/p>\n\n\n\n<p>Everything was working fine and had been since they were initially set up.<\/p>\n\n\n\n<p>The aim of the project was to set up custom events and conversions that would demonstrate a user landing on the main site, then clicking through to the subdomain to follow a sign up process through to completion.<\/p>\n\n\n\n<p>The main site is WordPress, and the subdomain is a bespoke custom site built using React so was essentially an SPA architecture, where all content is loaded on a single page and dynamically updated as needed.<\/p>\n\n\n\n<p>This shouldn\u2019t be an issue though for GTM, you can use History change based triggers to detect when a user moves from URL to URL.<\/p>\n\n\n\n<p>Initially I was working on a test environment before the new content and functions were rolled out to the live site ahead of the product launch.<\/p>\n\n\n\n<p>In both cases, the events were set up, and all was working as I tested the events through to conversion I could see them firing correctly and being tracked as events in GA4.<\/p>\n\n\n\n<p>However, when the pages went live and users were accessing the pages, nothing was being tracked.<\/p>\n\n\n\n<p>I initially thought it might be a JS or SPA related issue, but no matter how many times I tried and tested different ways of tracking a user, whilst everything worked ok for me, nothing was tracking for any other user. <\/p>\n\n\n\n<p>Ultimately, I had to ask myself some basic questions to try and get to the bottom of it, which I eventually did.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#TLDR\" >TLDR<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#How_do_I_make_sure_my_tags_and_triggers_are_set_up_correctly_in_Tag_Manager\" >How do I make sure my tags and triggers are set up correctly in Tag Manager?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#What_is_the_Google_Tag_Assistant_Extension\" >What is the Google Tag Assistant Extension?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#How_do_I_view_Google_Tag_Manager_events_in_Google_Analytics\" >How do I view Google Tag Manager events in Google Analytics?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#What_is_real_time_tracking_in_GA4\" >What is real time tracking in GA4?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#What_is_GA4_Debug_View\" >What is GA4 Debug View?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#What_could_be_the_reasons_for_my_events_not_showing_in_Google_Analytics\" >What could be the reasons for my events not showing in Google Analytics?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#The_ga_Method_Has_Been_Hijacked\" >The ga() Method Has Been Hijacked<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#You_Have_Not_Been_Assigned_Publish_Permissions\" >You Have Not Been Assigned Publish Permissions<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#What_are_the_user_roles_in_GTM\" >What are the user roles in GTM?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/daveashworth.co\/blog\/solved-why-google-tag-manager-events-are-not-showing-in-analytics\/#What_are_the_user_permission_levels_in_Google_Tag_Manager\" >What are the user permission levels in Google Tag Manager?<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TLDR\"><\/span>TLDR<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you can\u2019t see events you\u2019ve created in GTM appearing in GA4 you more than likely to find that your account does not have publish permissions<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_do_I_make_sure_my_tags_and_triggers_are_set_up_correctly_in_Tag_Manager\"><\/span><strong>How do I make sure my tags and triggers are set up correctly in Tag Manager?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When you have created you\u2019re tags and triggers, use the preview and debug mode to test your tag and trigger setup. This feature allows you to test your setup in a staging environment before pushing it live. It will also provide you with information on what tags are firing and not firing, and what errors might be occurring.<\/p>\n\n\n\n<p>Once you\u2019ve set up the tags and triggers such as:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"282\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tags_and_triggers-1024x282.png\" alt=\"tags and triggers\" class=\"wp-image-1184\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tags_and_triggers-1024x282.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tags_and_triggers-300x83.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tags_and_triggers-150x41.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tags_and_triggers-768x212.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tags_and_triggers.png 1289w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You then launch preview mode:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"704\" height=\"66\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/launch_preview_mode.png\" alt=\"Preview\" class=\"wp-image-1185\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/launch_preview_mode.png 704w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/launch_preview_mode-300x28.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/launch_preview_mode-150x14.png 150w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/figure>\n\n\n\n<p>From here, after you have launched you\u2019re site, you can see a tab for the tag assistant.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_the_Google_Tag_Assistant_Extension\"><\/span><strong>What is the Google Tag Assistant Extension?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The Google Tag Assistant extension is a helpful tool developed by Google to assist website owners in verifying and troubleshooting tracking codes on their websites. This extension, available for Google Chrome, allows users to easily track whether Google tags are correctly implemented on a webpage. With just a few clicks, website owners can confirm if Google Analytics, Google Ads Conversion Tracking, and other tags are firing correctly. The Google Tag Assistant extension not only saves time but also ensures accurate data collection, enhancing the overall performance of online advertising campaigns.<\/p>\n\n\n\n<p>You can see a summary of all the tags that have fired on a page as well as clicking default and custom events to see what fires when:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"564\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_tags-1024x564.png\" alt=\"tag assistant tags\" class=\"wp-image-1186\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_tags-1024x564.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_tags-300x165.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_tags-150x83.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_tags-768x423.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_tags-1536x846.png 1536w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_tags.png 1604w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The state of any default and custom variables after any default of custom events have fired:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"1022\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_variables-1024x1022.png\" alt=\"tag assitant variables\" class=\"wp-image-1187\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_variables-1024x1022.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_variables-300x300.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_variables-150x150.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_variables-768x766.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_variables.png 1257w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And the current state of the data layer:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"252\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_data_layer-1024x252.png\" alt=\"DOM Ready\" class=\"wp-image-1188\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_data_layer-1024x252.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_data_layer-300x74.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_data_layer-150x37.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_data_layer-768x189.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_data_layer-1536x379.png 1536w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_assistant_data_layer.png 1639w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>From the above on my home page, I can see that a page view has fired, a linkedin pixel and some custom scripts I use.<\/p>\n\n\n\n<p>One GA4 event I have set up is to <a href=\"https:\/\/daveashworth.co\/blog\/how-to-track-link-or-banner-clicks-in-the-main-content-area-of-a-page-using-gtm\/\">detect when a user has clicked on a specific section of links on my home page<\/a>.<\/p>\n\n\n\n<p>So, when I click on such a link, I see the following in tag manager to show as and when it fired:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"704\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/link_click_tags-1024x704.png\" alt=\"Link Click\" class=\"wp-image-1189\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/link_click_tags-1024x704.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/link_click_tags-300x206.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/link_click_tags-150x103.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/link_click_tags-768x528.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/link_click_tags.png 1377w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can then also click on the tag to see how\/why it fired and what variables were passed:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_property-1024x572.png\" alt=\"tag property\" class=\"wp-image-1190\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_property-1024x572.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_property-300x168.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_property-150x84.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_property-768x429.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_property-1536x859.png 1536w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/tag_property.png 1646w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is all firing as expected, so now to check it\u2019s tracking into GA4<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_do_I_view_Google_Tag_Manager_events_in_Google_Analytics\"><\/span><strong>How do I view Google Tag Manager events in Google Analytics?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are two ways to do this, real time tracking and debug view<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_real_time_tracking_in_GA4\"><\/span><strong>What is real time tracking in GA4?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Real-time tracking in Google Analytics 4 (GA4) is a feature that allows you to see the data from your website or app as it happens, in real-time. This means that you can view user behaviour and interactions on your site or app as they occur, without having to wait for the data to be processed and analysed.<\/p>\n\n\n\n<p>To access real time reports, click \u201cRealtime\u201d in the reports menu:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"603\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/real_time_tracking-1024x603.png\" alt=\"real time tracking\" class=\"wp-image-1191\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/real_time_tracking-1024x603.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/real_time_tracking-300x177.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/real_time_tracking-150x88.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/real_time_tracking-768x452.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/real_time_tracking-1536x905.png 1536w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/real_time_tracking.png 1974w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here you can see the events that are occurring on your site, such as my home page link click event:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"387\" height=\"506\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/home_page_link_click_event.png\" alt=\"home page link click event\" class=\"wp-image-1192\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/home_page_link_click_event.png 387w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/home_page_link_click_event-229x300.png 229w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/home_page_link_click_event-115x150.png 115w\" sizes=\"(max-width: 387px) 100vw, 387px\" \/><\/figure>\n\n\n\n<p>So far, so good.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_GA4_Debug_View\"><\/span><strong>What is GA4 Debug View?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The GA4 Debug View is a valuable tool that provides developers with essential insights into the functioning and performance of their code. This debug view specifically caters to the Google Analytics 4 (GA4) platform, enabling programmers to monitor and track data collection and event tagging processes accurately. By utilizing the GA4 Debug View, developers can identify and rectify any issues or discrepancies in their analytics implementation, ensuring that data is gathered correctly and enhances the overall user experience. With its user-friendly interface and comprehensive features, the GA4 Debug View has become an indispensable asset for programmers seeking to optimize their Google Analytics integration.<\/p>\n\n\n\n<p>To access this, go to \u201cDebug View\u201d in your GA4 property menu:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"842\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/property_menu-1024x842.png\" alt=\"property menu\" class=\"wp-image-1193\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/property_menu-1024x842.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/property_menu-300x247.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/property_menu-150x123.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/property_menu-768x631.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/property_menu.png 1163w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Where like real time tracking, you can see events that are firing, but the difference is that you only see data sent from users visiting the site in debug mode only.&nbsp; So basically you, when you\u2019ve access the site via GTM and is why this URL parameter is appended when you launch the site in preview mode:<\/p>\n\n\n\n<p><a href=\"https:\/\/daveashworth.co\/?gtm_debug=1679854325388\">https:\/\/daveashworth.co\/?gtm_debug=1679854325388<\/a><\/p>\n\n\n\n<p>you will then see what fires when in debug view:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/debug_view-1024x536.png\" alt=\"debug view\" class=\"wp-image-1194\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/debug_view-1024x536.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/debug_view-300x157.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/debug_view-150x79.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/debug_view-768x402.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/debug_view.png 1388w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Again, everything is working fine, and this was the case on the recent project.<\/p>\n\n\n\n<p>Which led me to ask myself the next question:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_could_be_the_reasons_for_my_events_not_showing_in_Google_Analytics\"><\/span><strong>What could be the reasons for my events not showing in Google Analytics?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After much googling (and a spot of binging), I found myself with two possible answers.<\/p>\n\n\n\n<p>The first is quite technical:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_ga_Method_Has_Been_Hijacked\"><\/span><strong>The ga() Method Has Been Hijacked<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This refers to a situation where the ga() method, which is the JavaScript function used to send data to Google Analytics, has been modified or replaced by another script or piece of code.<\/p>\n\n\n\n<p>When the ga() method is hijacked, it means that the data sent to Google Analytics is being intercepted and possibly manipulated before it is sent to Google Analytics servers. This can result in inaccurate or incomplete data being collected, which can affect the accuracy of your Google Analytics reports.<\/p>\n\n\n\n<p>There are several ways in which the ga() method can be hijacked. For example, a third-party script or browser extension may be modifying the ga() method, or a malicious attacker may have injected malicious code into your website that modifies the ga() method.<\/p>\n\n\n\n<p>To find out more about how to diagnose this issue, these were the articles I found, here:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.analyticsmania.com\/post\/event-tracking-in-google-tag-manager-is-not-working\/#hijacked-ga\" target=\"_blank\" rel=\"noopener\">https:\/\/www.analyticsmania.com\/post\/event-tracking-in-google-tag-manager-is-not-working\/#hijacked-ga<\/a><\/p>\n\n\n\n<p>and here:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.simoahava.com\/analytics\/still-running-google-tag-manager-tags\/#2-the-ga-method-is-hijacked-by-some-other-code-running-on-the-site\" target=\"_blank\" rel=\"noopener\">https:\/\/www.simoahava.com\/analytics\/still-running-google-tag-manager-tags\/#2-the-ga-method-is-hijacked-by-some-other-code-running-on-the-site<\/a><\/p>\n\n\n\n<p>whilst the site config on the JS generated site did demonstrate similar behaviour to what is described in those articles, I noticed some other things going on that suggested going down the technical JS issue route was a case of not seeing the woods for the trees.&nbsp; It felt like a school boy error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"You_Have_Not_Been_Assigned_Publish_Permissions\"><\/span><strong>You Have Not Been Assigned Publish Permissions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>When I was added to the GTM account, I had been added with approval permissions, and not full admin able to publish.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"673\" height=\"130\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/user_permissions.png\" alt=\"user permissions\" class=\"wp-image-1195\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/user_permissions.png 673w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/user_permissions-300x58.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/user_permissions-150x29.png 150w\" sizes=\"(max-width: 673px) 100vw, 673px\" \/><\/figure>\n\n\n\n<p>FFS<\/p>\n\n\n\n<p>In my defence, to date, I\u2019ve always been added as an admin user with full permissions &nbsp;it\u2019s really not obvious when using GTM if you have been assigned Publish or Approval permissions, but, this will make all the difference as to whether changes go live when you click the publish button.<\/p>\n\n\n\n<p>To explain further:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_the_user_roles_in_GTM\"><\/span><strong>What are the user roles in GTM?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>There are 2 roles as follows:<\/p>\n\n\n\n<p><strong>User: <\/strong>A user in GTM has read-only access to the containers in the account. They can view all tags, triggers, and variables, as well as see the current state of the container version. However, they cannot make any changes or modifications to the container or its contents.<\/p>\n\n\n\n<p><strong>Administrator: <\/strong>An administrator in GTM has full access to all containers within an account. They can add, edit, and remove users, as well as grant or revoke access to containers. Administrators can also create and publish container versions, manage tags, triggers, and variables, and modify container settings.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_the_user_permission_levels_in_Google_Tag_Manager\"><\/span><strong>What are the user permission levels in Google Tag Manager?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Further to the above, aside from full administrator access, there are 5 permission levels as follows:<\/p>\n\n\n\n<p><strong>No Access:<\/strong> Users with No Access cannot access the account or any containers within the account.<\/p>\n\n\n\n<p><strong>View: <\/strong>Users with View access can view container contents and tracking information, but cannot make any changes or modifications to the container or its contents.<\/p>\n\n\n\n<p><strong>Edit:<\/strong> Users with Edit access can make changes and modifications to containers, as well as create, modify, and publish container versions. They cannot manage users or change user access to the account or containers.<\/p>\n\n\n\n<p><strong>Approve:<\/strong> Users with Approve access can review and approve container versions, as well as publish them to the live environment. They cannot create or modify container versions, manage users, or change user access to the account or containers.<\/p>\n\n\n\n<p><strong>Manage: <\/strong>Users with Manage access have full access to all containers within an account. They can add, edit, and remove users, as well as grant or revoke access to containers. They can also create and publish container versions, manage tags, triggers, and variables, and modify container settings.<\/p>\n\n\n\n<p>The confusion came when I was adding tags and triggers and click \u201cpublish\u201d, because that makes me think the changes will be published. In full admin mode, when you commit changes the UI is as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"466\" height=\"45\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button.png\" alt=\"submit button\" class=\"wp-image-1196\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button.png 466w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button-300x29.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button-150x14.png 150w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/figure>\n\n\n\n<p>In approval mode, it looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"466\" height=\"45\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button.png\" alt=\"submit button\" class=\"wp-image-1196\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button.png 466w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button-300x29.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/submit_button-150x14.png 150w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/figure>\n\n\n\n<p>You\u2019d think they\u2019d amend to button to read \u201csubmit for approval\u201d or similar.<\/p>\n\n\n\n<p>The other give away was when looking at version history, you can see every time I clicked submit the version was updated, however, the live version was still the same one that was in place when I started working on the project:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/version_history-1024x566.png\" alt=\"version history\" class=\"wp-image-1197\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/version_history-1024x566.png 1024w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/version_history-300x166.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/version_history-150x83.png 150w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/version_history-768x425.png 768w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/03\/version_history.png 1154w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Fair to say, even after several years of working with GTM, every day is a school day.<\/p>\n\n\n\n<p>I hope this helps you with an similar issues you are facing, but if not or you are having trouble with any of the aspects of GTM mentioned in this post, please feel free to get in touch using the contact form below.<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n\t\"@context\": \"https:\/\/schema.org\",\n\t\"@type\": \"FAQPage\",\n\t\"mainEntity\": \n\t[\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"Why Are My Google Tag Manager Events Not Showing In Analytics?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"If you can\u2019t see events you\u2019ve created in GTM appearing in GA4 you more than likely to find that your account does not have publish permissions.  It may also be down to the ga() method having been hijacked\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"How do I make sure my tags and triggers are set up correctly in Tag Manager?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"When you have created you\u2019re tags and triggers, use the preview and debug mode to test your tag and trigger setup. This feature allows you to test your setup in a staging environment before pushing it live. It will also provide you with information on what tags are firing and not firing, and what errors might be occurring.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What is the Google Tag Assistant Extension?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"The Google Tag Assistant extension is a helpful tool developed by Google to assist website owners in verifying and troubleshooting tracking codes on their websites. This extension, available for Google Chrome, allows users to easily track whether Google tags are correctly implemented on a webpage. With just a few clicks, website owners can confirm if Google Analytics, Google Ads Conversion Tracking, and other tags are firing correctly. The Google Tag Assistant extension not only saves time but also ensures accurate data collection, enhancing the overall performance of online advertising campaigns.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"How do I view Google Tag Manager events in Google Analytics?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"There are two ways to do this, real time tracking and debug view\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What is real time tracking in GA4?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"Real-time tracking in Google Analytics 4 (GA4) is a feature that allows you to see the data from your website or app as it happens, in real-time. This means that you can view user behaviour and interactions on your site or app as they occur, without having to wait for the data to be processed and analysed.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What is GA4 Debug View?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"The GA4 Debug View is a valuable tool that provides developers with essential insights into the functioning and performance of their code. This debug view specifically caters to the Google Analytics 4 (GA4) platform, enabling programmers to monitor and track data collection and event tagging processes accurately. By utilizing the GA4 Debug View, developers can identify and rectify any issues or discrepancies in their analytics implementation, ensuring that data is gathered correctly and enhances the overall user experience. With its user-friendly interface and comprehensive features, the GA4 Debug View has become an indispensable asset for programmers seeking to optimize their Google Analytics integration.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What are the user roles in GTM?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"<p>There are 2 roles as follows:<\/p><p>User: A user in GTM has read-only access to the containers in the account. They can view all tags, triggers, and variables, as well as see the current state of the container version. However, they cannot make any changes or modifications to the container or its contents.<\/p><p>Administrator: An administrator in GTM has full access to all containers within an account. They can add, edit, and remove users, as well as grant or revoke access to containers. Administrators can also create and publish container versions, manage tags, triggers, and variables, and modify container settings.<\/p>\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What are the user permission levels in Google Tag Manager?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"<p>There are 5 permission levels as follows:<\/p><ul><li>No Access: Users with No Access cannot access the account or any containers within the account.<\/li><li>View: Users with View access can view container contents and tracking information, but cannot make any changes or modifications to the container or its contents.<\/li><li>Edit: Users with Edit access can make changes and modifications to containers, as well as create, modify, and publish container versions. They cannot manage users or change user access to the account or containers.<\/li><li>Approve: Users with Approve access can review and approve container versions, as well as publish them to the live environment. They cannot create or modify container versions, manage users, or change user access to the account or containers.<\/li><li>Manage: Users with Manage access have full access to all containers within an account. They can add, edit, and remove users, as well as grant or revoke access to containers. They can also create and publish container versions, manage tags, triggers, and variables, and modify container settings.<\/li><\/ul>\"\n\t\t\t}\n\t\t}\n\t]\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>I recently experienced what turned out to be a common issue for folk using Google Tag Manager to track custom events into Universal and Google Analytics 4, though for a while it had me totally baffled.   The solution turned out to be far more straightforward that I had thought it would be.  A severe case of wood for the trees on my part.<\/p>\n","protected":false},"author":1,"featured_media":1198,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,8],"tags":[],"class_list":["post-1183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","category-tag-manager"],"_links":{"self":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/posts\/1183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/comments?post=1183"}],"version-history":[{"count":0,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/posts\/1183\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/media\/1198"}],"wp:attachment":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/media?parent=1183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/categories?post=1183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/tags?post=1183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}