{"id":129137,"date":"2025-03-12T20:20:46","date_gmt":"2025-03-12T20:20:46","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/run-google-tag-manager-and-google-analytics-in-local-files\/"},"modified":"2025-03-12T20:20:46","modified_gmt":"2025-03-12T20:20:46","slug":"run-google-tag-manager-and-google-analytics-in-local-files","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=129137","title":{"rendered":"Run Google Tag Manager And Google Analytics In Local Files"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p><em>Last updated 2 March 2018.<\/em><\/p>\n<p>Every now and then you might be urged to run <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a> and\/or <a href=\"https:\/\/analytics.google.com\">Google Analytics<\/a> <em>locally<\/em>, meaning without the benefit of a web server serving your files. In other words, you\u2019re loading an HTML file from your computer in the web browser. You can identify a locally run file by the <strong>file:\/\/\/<\/strong> <em>protocol<\/em> in the address bar.<\/p>\n<div style=\"aspect-ratio: 1026 \/ 264;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/08\/local-ga.jpg\" title=\"Local file in web browser\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"264\" width=\"1026\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/08\/local-ga.jpg#ZgotmplZ\" alt=\"Local file in web browser\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Now, deploying Google Tag Manager onto that file with the hopes of running Google Analytics requests locally isn\u2019t quite simple. Well, actually, the deployment is fairly simple, but customizing it so that it actually sends useful hits requires some tweaking.<\/p>\n<blockquote>\n<p><strong>Note!<\/strong> You will <strong>not<\/strong> be able to run <strong>Preview<\/strong> mode with local files. GTM automatically uses relative protocol when downloading the preview library, and relative protocol on local files falls back to <code>file:\/\/\/<\/code> for the HTTP requests. If someone comes up with an elegant workaround, please let me know in the comments!<\/p>\n<\/blockquote>\n<p>                <span class=\"simmer\"><br \/>\n  <span class=\"close\">X<\/span><\/p>\n<p>\n    <span class=\"fa fa-md fa-bell\"\/><br \/>\n    <strong>The Simmer Newsletter<\/strong>\n  <\/p>\n<p>\n    Subscribe to the <a href=\"https:\/\/www.simoahava.com\/newsletter\/\">Simmer newsletter<\/a> to get the latest news and content from Simo Ahava into your email inbox!\n  <\/p>\n<p>  <\/span><\/p>\n<h2 id=\"1-modify-the-gtm-container-snippet\">1. Modify the GTM Container Snippet<\/h2>\n<p>First of all, you need to modify the Google Tag Manager container snippet itself. It uses <em>relative protocol<\/em> in the script loader URLs, and since local files use the <strong>file<\/strong> URI scheme, you need to explicitly tell Google Tag Manager from where to fetch the library.<\/p>\n<p>So, if this is the container snippet:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-html\" data-lang=\"html\"><span style=\"color:#aaa;font-style:italic\"><!-- Google Tag Manager --><\/span>\nnoscript&gt;iframe <span style=\"color:#1e90ff\">src<\/span>=<span style=\"color:#a50\">\"\/\/www.googletagmanager.com\/ns.html?id=GTM-XXXXX\"<\/span>\n<span style=\"color:#1e90ff\">height<\/span>=<span style=\"color:#a50\">\"0\"<\/span> <span style=\"color:#1e90ff\">width<\/span>=<span style=\"color:#a50\">\"0\"<\/span> <span style=\"color:#1e90ff\">style<\/span>=<span style=\"color:#a50\">\"display:none;visibility:hidden\"<\/span>&gt;<span style=\"color:#1e90ff;font-weight:bold\">iframe<\/span>&gt;<span style=\"color:#1e90ff;font-weight:bold\">noscript<\/span>&gt;\nscript&gt;(<span style=\"color:#00a\">function<\/span>(w,d,s,l,i){w[l]=w[l]||[];w[l].push({<span style=\"color:#a50\">'gtm.start'<\/span>:\n<span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime(),event:<span style=\"color:#a50\">'gtm.js'<\/span>});<span style=\"color:#00a\">var<\/span> f=d.getElementsByTagName(s)[<span style=\"color:#099\">0<\/span>],\nj=d.createElement(s),dl=l!=<span style=\"color:#a50\">'dataLayer'<\/span>?<span style=\"color:#a50\">'&amp;l='<\/span>+l:<span style=\"color:#a50\">''<\/span>;j.async=<span style=\"color:#00a\">true<\/span>;j.src=\n<span style=\"color:#a50\">'\/\/www.googletagmanager.com\/gtm.js?id='<\/span>+i+dl;f.parentNode.insertBefore(j,f);\n})(<span style=\"color:#0aa\">window<\/span>,<span style=\"color:#0aa\">document<\/span>,<span style=\"color:#a50\">'script'<\/span>,<span style=\"color:#a50\">'dataLayer'<\/span>,<span style=\"color:#a50\">'GTM-XXXXX'<\/span>);<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;\n<span style=\"color:#aaa;font-style:italic\"><!-- End Google Tag Manager --><\/span><\/code><\/pre>\n<\/div>\n<p>You can see how the two URLs embedded within (<code>\/\/www.googletagmanager.com\/ns.html...<\/code> in the iframe and <code>\/\/www.googletagmanager.com\/gtm.js...<\/code> in the script loader itself) do not have an explicit protocol set. So, you need to change these two strings to become <code>https:\/\/www.googletagmanager.com\/ns.html...<\/code> and <code>https:\/\/www.googletagmanager.com\/gtm.js...<\/code>, respectively. That is the only change you need to make to load Google Tag Manager.<\/p>\n<p>So, well done!<\/p>\n<p>The next step is to configure the Google Analytics Tags. GA places some restrictions on the web browser if loaded with its default settings:<\/p>\n<ol>\n<li>\n<p>The host making the requests to GA needs to have either <strong>http<\/strong> or <strong>https<\/strong> as the protocol.<\/p>\n<\/li>\n<li>\n<p>The host must support storing the Client ID in browser cookies.<\/p>\n<\/li>\n<li>\n<p>The host must be able to pass a proper Document Location value (the URL) to Google Analytics.<\/p>\n<\/li>\n<\/ol>\n<p>Each one of these three is violated by local files. First, local files use the <strong>file:\/\/\/<\/strong> protocol, as stated earlier. Second, web browsers disable cookies when browsing local files. Third, the URL sent by the client to Google Analytics in the Document Location field is the one with the <strong>file<\/strong> URI scheme, again, meaning it\u2019s not parsed correctly by GA into a proper page path.<\/p>\n<p>Luckily, Google Analytics has fields that you can set to make it pass all these three checks.<\/p>\n<p>First, you\u2019ll need to create a helper Variable. It\u2019s a <strong>Custom JavaScript Variable<\/strong> with the name <strong>Empty function<\/strong> and the following code within:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\"><span style=\"color:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">return<\/span> <span style=\"color:#00a\">function<\/span>() {}\n}\n<\/code><\/pre>\n<\/div>\n<p>Next, in your Google Analytics Tags, browse down to <strong>Fields to Set<\/strong>, and add the following fields and values:<\/p>\n<p>Field name: <strong>checkProtocolTask<\/strong><br \/>Field value: <strong>{{Empty function}}<\/strong><\/p>\n<p>Field name: <strong>storage<\/strong><br \/>Field value: <strong>none<\/strong><\/p>\n<p>Field name: <strong>page<\/strong><br \/>Field value: <strong>{{Page Path}}<\/strong><\/p>\n<p>The first field tells GA not to check for valid protocol (http or https) when making the request to \/collect.<\/p>\n<p>The second field tells GA not to use browser cookies for persisting the Client ID.<\/p>\n<p>The third field tells GA to override the faulty Document Location with the page\u2019s pathname.<\/p>\n<div style=\"aspect-ratio: 1544 \/ 542;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/08\/ga-tag-fields.jpg\" title=\"GA Tag fields\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"542\" width=\"1544\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/08\/ga-tag-fields.jpg#ZgotmplZ\" alt=\"GA Tag fields\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>And that\u2019s it! With these steps, you can track your Pageviews and Events in your local files, if you are so inclined.<\/p>\n<h2 id=\"3-persist-client-id\">3. Persist Client ID<\/h2>\n<p>However, the downside of setting <code>storage : none<\/code> is that you won\u2019t have a persistent Client ID anymore. Thus, every single page load will reset the Client ID, resulting in a new User and new Session with every single page.<\/p>\n<p>We don\u2019t want that.<\/p>\n<p>Instead, we can hack around that using the browser\u2019s <code>localStorage<\/code> API to store the Client ID and fetch it with each request.<\/p>\n<p>You\u2019ll need <strong>two<\/strong> new Variables.<\/p>\n<p>The first one is a <strong>Custom JavaScript Variable<\/strong> with the name <strong>JS &#8211; Set _clientId<\/strong>, and the following code within:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\"><span style=\"color:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">return<\/span> <span style=\"color:#00a\">function<\/span>() {\n    <span style=\"color:#00a\">if<\/span> (<span style=\"color:#0aa\">window<\/span>.Storage) {\n      <span style=\"color:#0aa\">window<\/span>.localStorage.setItem(<span style=\"color:#a50\">'_clientId'<\/span>, ga.getAll()[<span style=\"color:#099\">0<\/span>].get(<span style=\"color:#a50\">'clientId'<\/span>));\n    }\n  }\n}\n<\/code><\/pre>\n<\/div>\n<p>The second is a <strong>Custom JavaScript Variable<\/strong> with the name <strong>JS &#8211; Get _clientId<\/strong>, and the following code within:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\"><span style=\"color:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">if<\/span> (<span style=\"color:#0aa\">window<\/span>.Storage) {\n    <span style=\"color:#00a\">return<\/span> <span style=\"color:#0aa\">window<\/span>.localStorage.getItem(<span style=\"color:#a50\">'_clientId'<\/span>) || <span style=\"color:#00a\">undefined<\/span>;\n  }\n  <span style=\"color:#00a\">return<\/span>;\n}\n<\/code><\/pre>\n<\/div>\n<p>The first Variable stores the Client ID in the browser\u2019s <code>localStorage<\/code>, and the second Variable fetches it from the same place (or returns <em>undefined<\/em> if Client ID isn\u2019t stored).<\/p>\n<p>Finally, in your Google Analytics Tags, go to Fields to Set again, and set the following two fields:<\/p>\n<p>Field name: <strong>hitCallback<\/strong><br \/>Field value: <strong>{{JS &#8211; Set _clientId}}<\/strong><\/p>\n<p>Field name: <strong>clientId<\/strong><br \/>Field value: <strong>{{JS &#8211; Get _clientId}}<\/strong><\/p>\n<p>And there you go! Now, the first time a Google Analytics Tag fires, it stores the Client ID created in the process into the browser\u2019s <code>localStorage<\/code>. For each subsequent Tag, until <code>localStorage<\/code> is manually purged, the Tags fetch the stored Client ID from <code>localStorage<\/code> and send it with the requests. This way sessions and users stay intact, and you\u2019ll be able to derive proper insights from the data.<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>This hack probably has only marginal use, but it\u2019s still a valid way of tracking Google Analytics in local files. You don\u2019t always have the benefit of (or the skills to deploy) a web server, so running files locally is, if nothing else, a hat tip to the Notepad + FTP content management systems from the 1990s.<\/p>\n<p>Also, you can use the Client ID hack in your regular trackers, too, if you have some reason to avoid browser cookies for persisting data.<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Last updated 2 March 2018. Every now and then you might be urged to run Google Tag Manager and\/or Google Analytics locally, meaning without the benefit of a web server serving your files. In other words, you\u2019re loading an HTML file from your computer in the web browser. You can identify a locally run file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":129138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[12765,8277,1531,13747,14495,2753,1791],"dealstore":[],"offerexpiration":[],"class_list":["post-129137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-analytics","tag-files","tag-google","tag-local","tag-manager","tag-run","tag-tag"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Run Google Tag Manager And Google Analytics In Local Files - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=129137\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Run Google Tag Manager And Google Analytics In Local Files - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Last updated 2 March 2018. Every now and then you might be urged to run Google Tag Manager and\/or Google Analytics locally, meaning without the benefit of a web server serving your files. In other words, you\u2019re loading an HTML file from your computer in the web browser. You can identify a locally run file [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=129137\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-12T20:20:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1026\" \/>\n\t<meta property=\"og:image:height\" content=\"264\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=129137#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=129137\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Run Google Tag Manager And Google Analytics In Local Files\",\"datePublished\":\"2025-03-12T20:20:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=129137\"},\"wordCount\":922,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=129137#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg\",\"keywords\":[\"Analytics\",\"files\",\"Google\",\"local\",\"Manager\",\"Run\",\"TAG\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=129137#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=129137\",\"url\":\"https:\/\/fivemor.com\/?p=129137\",\"name\":\"Run Google Tag Manager And Google Analytics In Local Files - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=129137#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=129137#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg\",\"datePublished\":\"2025-03-12T20:20:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=129137#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=129137\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=129137#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg\",\"width\":1026,\"height\":264},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=129137#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run Google Tag Manager And Google Analytics In Local Files\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Run Google Tag Manager And Google Analytics In Local Files - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=129137","og_locale":"en_US","og_type":"article","og_title":"Run Google Tag Manager And Google Analytics In Local Files - Som2ny Network","og_description":"Last updated 2 March 2018. Every now and then you might be urged to run Google Tag Manager and\/or Google Analytics locally, meaning without the benefit of a web server serving your files. In other words, you\u2019re loading an HTML file from your computer in the web browser. You can identify a locally run file [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=129137","og_site_name":"Som2ny Network","article_published_time":"2025-03-12T20:20:46+00:00","og_image":[{"width":1026,"height":264,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=129137#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=129137"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Run Google Tag Manager And Google Analytics In Local Files","datePublished":"2025-03-12T20:20:46+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=129137"},"wordCount":922,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=129137#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg","keywords":["Analytics","files","Google","local","Manager","Run","TAG"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=129137#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=129137","url":"https:\/\/fivemor.com\/?p=129137","name":"Run Google Tag Manager And Google Analytics In Local Files - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=129137#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=129137#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg","datePublished":"2025-03-12T20:20:46+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=129137#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=129137"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=129137#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/local-ga.jpg","width":1026,"height":264},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=129137#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Run Google Tag Manager And Google Analytics In Local Files"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/129137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=129137"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/129137\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/129138"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=129137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=129137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=129137"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=129137"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=129137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}