{"id":1134,"date":"2021-05-17T07:55:45","date_gmt":"2021-05-17T07:55:45","guid":{"rendered":"https:\/\/vaniseo.com\/agence-digitale-a-marseille-google-analytics-exclure-le-trafic-interne-2\/"},"modified":"2021-05-17T07:55:45","modified_gmt":"2021-05-17T07:55:45","slug":"digital-agency-in-marseille-google-analytics-excluding-internal-traffic-2","status":"publish","type":"post","link":"https:\/\/vaniseo.com\/en\/2021\/05\/17\/agence-digitale-a-marseille-google-analytics-exclure-le-trafic-interne-2\/","title":{"rendered":"How to exclude internal traffic 2\/3"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Method No. 2 \u2013 Exclude internal traffic using the data layer<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u2981 Step 1. Retrieve the internal data parameter from the data layer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If possible, you should ask them to send the `user_type` (or `traffic_type`, or similar) parameter to the data layer, which could help you identify whether the visitor or user belongs to your own organisation. If a visitor belongs to your organisation, the parameter value must be \u2018internal\u2019. If a user or visitor does not belong to your organisation, no `dataLayer.push` should occur.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is an example of `dataLayer.push` code that your developer could enable if the user\/visitor is associated with your organisation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1728\" height=\"884\" src=\"https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/code-datalayer.push_.png\" alt=\"Web Marketing Agency \u2013 datalayer.push code\" class=\"wp-image-893\" srcset=\"https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/code-datalayer.push_.png 1728w, https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/code-datalayer.push_-300x153.png 300w, https:\/\/vaniseo.com\/wp-content\/uploads\/2026\/10\/code-datalayer.push_-1024x524.png 1024w\" sizes=\"auto, (max-width: 1728px) 100vw, 1728px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The event key is not required (but is recommended). It is important that this code is enabled before the GTM Container snippet is loaded.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, create a data layer variable with the following settings:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2981 Step 2. Create a developer filter in GA4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In GA4, go to Admin &gt; Data Settings &gt; Data Filters &gt; Create a filter and select \"Developer Traffic\".<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can enter any name in the \u00abData filter name\u00bb field. Set this filter to \u2018Test\u2019 (for now). Save it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2981 Step 3. Create a lookup table in GTM to replace the \u2018traffic_type\u2019 parameter<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Go to Variables &gt; New &gt; Lookup Table.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we use the \u00abDebug Mode\u00bb variable as an input. If GTM Preview Mode is enabled, this variable will return \u2018true\u2019; consequently, the lookup table variable will return the word \u2018developer\u2019. If GTM Preview Mode is not enabled, the Debug Mode variable will return \u2018false\u2019; consequently, we will return the value of the data layer variable you created in the first step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, if the data layer contains the \u2018traffic_type\u2019 key, its value will be sent to GA. If the key does not exist, it will be set to \u2018undefined\u2019 (which means that GA4 will not send the \u2018traffic_type\u2019 key at all).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You need to save the variable. Finally, simply go to your Google Analytics 4 configuration tag and enter the following parameter: traffic_type. Its value should be the search table you have just created.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2981 Step 4. Test the filters<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\u2981 Step 5. Enable both filters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The final step is to enable both filters. Go to Admin (in GA) &gt; Data settings &gt; Data filters and set both triggers (internal traffic and developer traffic) to \u2018On\u2019. You can do this by opening each filter, changing its status, and then saving the changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, test everything again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Created by <a href=\"\/en\/\">Vaniseo<\/a> \u2013 Your <strong>Marseille web agency<\/strong><\/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>Agence digitale \u00e0 marseille : google analytics, exclure le trafic de son site internet marseille, site internet vitrine et e-commerce &#8211; sea marseille<\/p>","protected":false},"author":1,"featured_media":894,"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-1134","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\/1134","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=1134"}],"version-history":[{"count":0,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/posts\/1134\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/media\/894"}],"wp:attachment":[{"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/media?parent=1134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/categories?post=1134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vaniseo.com\/en\/wp-json\/wp\/v2\/tags?post=1134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}