{"id":1166,"date":"2021-07-08T08:30:26","date_gmt":"2021-07-08T08:30:26","guid":{"rendered":"https:\/\/vaniseo.com\/agence-adwords-et-marketing-digital-marseille-google-tag-manager-episode-13-detecter-les-page-404\/"},"modified":"2026-10-26T10:44:53","modified_gmt":"2026-10-26T10:44:53","slug":"adwords-and-digital-marketing-agency-in-marseille-google-tag-manager-episode-13-detecting-404-pages","status":"publish","type":"post","link":"https:\/\/vaniseo.com\/en\/2021\/07\/08\/agence-adwords-et-marketing-digital-marseille-google-tag-manager-episode-13-detecter-les-page-404\/","title":{"rendered":"Detect pages with 404 errors"},"content":{"rendered":"<p class=\"wp-block-paragraph\">You may come across 404 errors if you have changed URLs on your website and forgotten to update them with the new URLs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up an event tag<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The procedure for setting up an event tag is as follows:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a \u00abGoogle Analytics: Universal Analytics\u00bb tag of the \u00abevent\u00bb type It must be configured to log the URL that causes an error. To do this: for \u00abCategory\u00bb, enter \u00abErrors\u00bb; for \u00abActions\u00bb, enter \u00ab404 error\u00bb; and for \u00bbEvent Name\u2019, enter the variable {{Page URL}} Add your Google Analytics parameter<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Page detection and triggering<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To find out whether a user is on a 404 error page or not, you need to identify which page they are on. If they are on that error page, you need to report the page\u2019s URL by triggering the tag.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Compare page titles<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To retrieve a page\u2019s title, you must:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a custom variable in GTM. Go to \u00abVariables\u00bb and click \u00abNew\u00bb. Create a JavaScript variable using the term \u00abdocument.title\u00bb. Save it and name it \u00abPage Title\u00bb.\u00bb<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Creating the trigger<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You know how to retrieve a page\u2019s title; now you can create a trigger:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a \u00abPage View\u00bb trigger, then set the variable to \u00abPage Title\u00bb, \u00abcontains\u00bb and the page title: \u00abThis page does not exist\u00bb<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This trigger will only be activated on 404 error pages. You can now deploy a new version of your container by configuring the tag with this trigger.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Would you like to know how the emails and calls you receive come from your website? Tune in to the next episode.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1486\" height=\"592\" src=\"https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/declencheur-titrepage.png\" alt=\"AdWords and Digital Marketing Agency in Marseille \u2013 Headline trigger\" class=\"wp-image-961\" srcset=\"https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/declencheur-titrepage.png 1486w, https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/declencheur-titrepage-300x120.png 300w, https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/declencheur-titrepage-1024x408.png 1024w\" sizes=\"auto, (max-width: 1486px) 100vw, 1486px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Created by <a href=\"\/en\/\">Vaniseo<\/a>, your <a href=\"\/en\/marseille-web-agency\/\">web agency in Marseille<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Contact us<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Our team will get back to you within 24 hours<\/p>\n\n\n\n<div class=\"wp-block-group vn-post-cta\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"vn-post-cta-title wp-block-paragraph\">Fancy finding out how much each channel brings in?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Google Analytics 4, conversions, dashboards: we make your figures easy to understand.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/en\/google-analytics-4-data-marseille\/\">Discover our data services<\/a><\/div>\n<\/div>\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>AdWords and Digital Marketing Agency in Marseille: 404 errors, Google Tag Manager, event tags, pages and triggers, Google Analytics expert<\/p>","protected":false},"author":1,"featured_media":962,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","inline_featured_image":false,"wds_primary_category":0,"footnotes":""},"categories":[135],"tags":[],"class_list":["post-1166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-et-analytics"],"acf":[],"_links":{"self":[{"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/posts\/1166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/comments?post=1166"}],"version-history":[{"count":0,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/posts\/1166\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/media\/962"}],"wp:attachment":[{"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/media?parent=1166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/categories?post=1166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/tags?post=1166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}