{"id":178555,"date":"2025-04-09T09:31:07","date_gmt":"2025-04-09T09:31:07","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/universal-analytics-weather-as-a-custom-dimension\/"},"modified":"2025-04-09T09:31:07","modified_gmt":"2025-04-09T09:31:07","slug":"universal-analytics-weather-as-a-custom-dimension","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=178555","title":{"rendered":"Universal Analytics: Weather As A Custom Dimension"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p><em>There is a new version of this post for GTM V2 <a href=\"https:\/\/www.simoahava.com\/analytics\/send-weather-data-to-google-analytics-in-gtm-v2\/\">here<\/a>.<\/em><\/p>\n<p>[Last updated June 2014] I\u2019ve fallen in love with <a href=\"https:\/\/support.google.com\/analytics\/answer\/2790010?hl=en\">Universal Analytics<\/a> and <a href=\"https:\/\/www.google.com\/tagmanager\/\">Google Tag Manager<\/a>. Together they form an incredibly powerful tool for marketing professionals. In most cases, I no longer need to post recommendations to my client for yet another page template revision, since with the tag manager in place, I can just add custom code via the admin panel. Add to that the power of Universal Analytics with its ultra-sensitive Measurement Protocol, and the ability to craft custom dimensions and metrics, and voila! I\u2019m in a happy place.<\/p>\n<p>In this post, I take you through a short JavaScript dev journey of utilizing weather data as a custom dimension in your site\u2019s Analytics. You only need to have Universal Analytics and Google Tag Manager installed on your site.<\/p>\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=\"the-end-result\">The end result<\/h2>\n<p>This is what you get:<\/p>\n<div style=\"aspect-ratio: 1092 \/ 204;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2013\/09\/weather-custom-dimension.jpg\" title=\"Weather as a Custom Dimension\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"204\" width=\"1092\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2013\/09\/weather-custom-dimension.jpg#ZgotmplZ\" alt=\"Weather as a Custom Dimension\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>As you can see, I\u2019ve created a custom report which shows visits, pageviews and conversion rates (Pages \/ Visit &gt; 2) for various weather conditions. This report unequivocally, with a plain-as-day-without-a-doubt display of causality, proves that when it rains, people are more likely to convert. I should do more targeting to British audiences\u2026<\/p>\n<h2 id=\"create-a-new-tag-in-gtm\">Create a new tag in GTM<\/h2>\n<ul>\n<li>Name the tag \u201cWeather API\u201d<\/li>\n<li>Choose <strong>Custom HTML Tag<\/strong> as the tag type<\/li>\n<li>Enter the following code into the HTML field (<em>Note! You need to load jQuery for this to work! See here for more information)<\/em>:<\/li>\n<\/ul>\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\">script&gt;\n  <span style=\"color:#00a\">var<\/span> lat = geoplugin_latitude();\n  <span style=\"color:#00a\">var<\/span> lon = geoplugin_longitude();\n  <span style=\"color:#00a\">var<\/span> weather = <span style=\"color:#a50\">\"\"<\/span>;\n  <span style=\"color:#00a\">var<\/span> weatherAPI = <span style=\"color:#a50\">\"http:\/\/api.openweathermap.org\/data\/2.5\/weather?lat=\"<\/span>+lat+<span style=\"color:#a50\">\"&amp;lon=\"<\/span>+lon;\n\n  $.ajax({\n    type : <span style=\"color:#a50\">\"POST\"<\/span>,\n    dataType : <span style=\"color:#a50\">\"jsonp\"<\/span>,\n    url : weatherAPI+<span style=\"color:#a50\">\"&amp;units=metric&amp;callback=?\"<\/span>,\n    async : <span style=\"color:#00a\">true<\/span>,\n    success : <span style=\"color:#00a\">function<\/span>(data) {\n      weather = data.weather[<span style=\"color:#099\">0<\/span>].main;\n      dataLayer.push({<span style=\"color:#a50\">\"weather\"<\/span>: weather});\n    },\n    error : <span style=\"color:#00a\">function<\/span>(errorData) {\n      console.log(<span style=\"color:#a50\">\"Error while getting weather data :: \"<\/span>+errorData.status);\n    },\n    complete : <span style=\"color:#00a\">function<\/span>() {\n      dataLayer.push({<span style=\"color:#a50\">\"event\"<\/span>: <span style=\"color:#a50\">\"weatherDone\"<\/span>});\n    }\n  });\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<ul>\n<li>Add rule to fire tag on every page (<em>{{url}} matches RegEx .*<\/em>)<\/li>\n<\/ul>\n<p>Here\u2019s what\u2019s going on.<\/p>\n<p>First, a couple of external JavaScript functions are called to retrieve the longitude and latitude of the visitor by using their IP addresses. I\u2019m using the free <a href=\"http:\/\/www.geoplugin.com\">geoPlugin<\/a> service. You can load it on your site by adding <code><script src=\"&quot;http:\/\/www.geoplugin.net\/javascript.gp&quot;\"\/><\/code> in your template.<\/p>\n<p><em>Remember to load this script BEFORE the weather API runs. It\u2019s best to put it in the <code\/> of your page template. If you want, you can also put the script load as the first line of the custom HTML tag you just created.<\/em><\/p>\n<p>Next, I use the API of <a href=\"http:\/\/openweathermap.org\/\">OpenWeatherMap<\/a> to retrieve the weather data for the latitude and longitude I got in the previous step.<\/p>\n<p>In the AJAX call, I make an asynchronous call to the API, requesting the data in JSONP (since it originates from a different domain than mine). If the call is successful, I look for the \/weather\/main\/ node, as it has a nice, short description of the weather in the area (e.g. \u201cClear\u201d). I then push the string into the data layer.<\/p>\n<p>Finally, whether the API call is a success or not, I push an event \u201cweatherDone\u201d into the data layer. This is used to make sure the API call is done before the Universal Analytics tag is fired (see below).<\/p>\n<h2 id=\"create-new-custom-dimension-in-ga\">Create new custom dimension in GA<\/h2>\n<ul>\n<li>Go to the admin panel of your Google Analytics site<\/li>\n<li>Under <strong>Property<\/strong>, choose Custom Definitions \/ Custom Dimensions<\/li>\n<\/ul>\n<div style=\"aspect-ratio: 549 \/ 480;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2013\/09\/new-custom-dimension.jpg\" title=\"Create new Custom Dimension in Google Analytics\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"480\" width=\"549\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2013\/09\/new-custom-dimension.jpg#ZgotmplZ\" alt=\"Create new Custom Dimension in Google Analytics\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<ul>\n<li>Create a new Custom Dimension with the name \u201cWeather\u201d<\/li>\n<li>Scope the new dimension to Session<\/li>\n<li>Set the dimension as Active<\/li>\n<li>Click Save<\/li>\n<li>Make note of the index of the new dimension<\/li>\n<\/ul>\n<p>Here you create a new dimension in Google Analytics and set it active. You need to make note of the dimension index, since you will be referring to this in a short while.<\/p>\n<h2 id=\"create-new-macro-in-gtm\">Create new macro in GTM<\/h2>\n<ul>\n<li>In Google Tag Manager, go to your container and click New Macro<\/li>\n<\/ul>\n<div style=\"aspect-ratio: 490 \/ 286;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2013\/09\/new-macro.jpg\" title=\"Create new macro in Google Tag Manager\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"286\" width=\"490\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2013\/09\/new-macro.jpg#ZgotmplZ\" alt=\"Create new macro in Google Tag Manager\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<ul>\n<li>Name the macro \u201cWeather\u201d<\/li>\n<li>Set Macro Type as Data Layer Variable<\/li>\n<li>Type \u201cweather\u201d in Data Layer Variable Name<\/li>\n<li>Click Save<\/li>\n<\/ul>\n<p>You create the macro to access the weather string you pushed into the data layer a couple of steps ago.<\/p>\n<h2 id=\"edit-your-ga-tag\">Edit your GA tag<\/h2>\n<p>(<strong>NOTE!<\/strong> I suggest you take a look at <a href=\"https:\/\/www.simoahava.com\/analytics\/universal-analytics-send-custom-dimension-event\/\">this post<\/a> for details on sending the weather data using a non-interaction event instead. This way your precious pageviews will never be compromised if the weather script fails to work.)<\/p>\n<p>Steps:<\/p>\n<ul>\n<li>Go to the tag that tracks your pageviews and sends them to GA<\/li>\n<li>Choose More Settings<\/li>\n<li>Choose Custom Dimensions<\/li>\n<li>Add the index number of your new dimension in the Index field<\/li>\n<li>In the Dimension field, click {{+macro}} and choose the macro you just created<\/li>\n<\/ul>\n<div style=\"aspect-ratio: 742 \/ 411;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2013\/09\/send-custom-dimension.jpg\" title=\"Send Custom Dimension with the pageview\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"411\" width=\"742\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2013\/09\/send-custom-dimension.jpg#ZgotmplZ\" alt=\"Send Custom Dimension with the pageview\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<ul>\n<li>Edit the firing rule and add condition <strong>{{event}} equals weatherDone<\/strong><\/li>\n<\/ul>\n<div style=\"aspect-ratio: 669 \/ 161;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2013\/09\/weather-done.jpg\" title=\"Wait for weather script to run\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"161\" width=\"669\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2013\/09\/weather-done.jpg#ZgotmplZ\" alt=\"Wait for weather script to run\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<ul>\n<li>Save the tag<\/li>\n<li>Create a new container version<\/li>\n<li>Publish the new container version<\/li>\n<\/ul>\n<p>Here you send a new custom dimension with the pageview, and it gets its content from the data layer variable you pushed into the data layer during the weather API call. Since the calls are asynchronous, you\u2019ll need to make sure the UA tag is fired only after the weather API call has been made. This is done by waiting for the event <em>weatherDone<\/em> to be pushed into the data layer.<\/p>\n<h2 id=\"make-sure-everything-works\">Make sure everything works<\/h2>\n<ul>\n<li>Visit your site<\/li>\n<li>Take a look at the requests your site sends by using <a href=\"http:\/\/www.getfirebug.com\/\">Firebug<\/a> or something similar<\/li>\n<\/ul>\n<div style=\"aspect-ratio: 659 \/ 311;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2013\/09\/firebug.jpg\" title=\"Use Firebug to debug your scripts\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"311\" width=\"659\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2013\/09\/firebug.jpg#ZgotmplZ\" alt=\"Use Firebug to debug your scripts\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<h2 id=\"enjoy\">Enjoy<\/h2>\n<p>I created a new custom report in GA, with visits, pageviews and conversion rate as metrics, and my new custom dimension as the dimension.<\/p>\n<p>Note that it might take some time for the new dimension to start pulling in data. If Firebug tells you that the weather data is sent along with your pageview data, you\u2019re fine.<\/p>\n<p>This could be done in so many different ways, but I chose JavaScript simply for this quick prototype. I\u2019m pretty pleased with the result, and even though I make a couple of external calls, page load speed is not an issue. There\u2019s always a risk with asynchronous scripting that the user is quick enough to interact with the site before the pageview is sent, but I don\u2019t think that will be an issue with this light-weight scripting.<\/p>\n<p>I can think of a number of cool applications for this weather API, but I\u2019ll leave those to your imagination.<\/p>\n<p>Google Tag Manager and Universal Analytics do a terrific job of providing high value for marketing professionals. I love the fact that you don\u2019t need to mess with the page template, and you can test and preview your tags as much as you want before publishing them.<\/p>\n<p><strong>EDIT<\/strong>: I edited the firing rules so that the UA tag occurs only after the weather API call has completed.<\/p>\n<p><strong>EDIT II:<\/strong> Note that <strong>you need to load jQuery<\/strong> for this to work! The <em>$.ajax<\/em> call is a jQuery function! So either load the jQuery resource in the <code\/> of your page method (so that it gets loaded before the GTM container) OR have the following as the first line of the custom HTML tag:<\/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\">script <span style=\"color:#1e90ff\">src<\/span>=<span style=\"color:#a50\">\"\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.8.2\/jquery.min.js\"<\/span>&gt;<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<p><strong>EDIT III:<\/strong> Be sure to check my post on how to make sure the weather API is polled just <a href=\"https:\/\/www.simoahava.com\/analytics\/universal-analytics-fire-script-just-per-session\/\">once per visit<\/a>. This will improve site performance, and decrease the burden on the external API.<\/p>\n<p><strong>EDIT IV:<\/strong> Finally, see this post on <a href=\"https:\/\/www.simoahava.com\/analytics\/universal-analytics-send-custom-dimension-event\/\">sending custom dimensions with events<\/a> rather than pageviews for the optimal version of the code above.<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>There is a new version of this post for GTM V2 here. [Last updated June 2014] I\u2019ve fallen in love with Universal Analytics and Google Tag Manager. Together they form an incredibly powerful tool for marketing professionals. In most cases, I no longer need to post recommendations to my client for yet another page template [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":178556,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[12765,834,34452,1260,1558],"dealstore":[],"offerexpiration":[],"class_list":["post-178555","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-analytics","tag-custom","tag-dimension","tag-universal","tag-weather"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Universal Analytics: Weather As A Custom Dimension - 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=178555\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Universal Analytics: Weather As A Custom Dimension - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"There is a new version of this post for GTM V2 here. [Last updated June 2014] I\u2019ve fallen in love with Universal Analytics and Google Tag Manager. Together they form an incredibly powerful tool for marketing professionals. In most cases, I no longer need to post recommendations to my client for yet another page template [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=178555\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-09T09:31:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1092\" \/>\n\t<meta property=\"og:image:height\" content=\"204\" \/>\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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=178555#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=178555\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Universal Analytics: Weather As A Custom Dimension\",\"datePublished\":\"2025-04-09T09:31:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=178555\"},\"wordCount\":412,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=178555#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg\",\"keywords\":[\"Analytics\",\"Custom\",\"Dimension\",\"Universal\",\"Weather\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=178555#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=178555\",\"url\":\"https:\/\/fivemor.com\/?p=178555\",\"name\":\"Universal Analytics: Weather As A Custom Dimension - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=178555#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=178555#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg\",\"datePublished\":\"2025-04-09T09:31:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=178555#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=178555\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=178555#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg\",\"width\":1092,\"height\":204},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=178555#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Universal Analytics: Weather As A Custom Dimension\"}]},{\"@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":"Universal Analytics: Weather As A Custom Dimension - 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=178555","og_locale":"en_US","og_type":"article","og_title":"Universal Analytics: Weather As A Custom Dimension - Som2ny Network","og_description":"There is a new version of this post for GTM V2 here. [Last updated June 2014] I\u2019ve fallen in love with Universal Analytics and Google Tag Manager. Together they form an incredibly powerful tool for marketing professionals. In most cases, I no longer need to post recommendations to my client for yet another page template [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=178555","og_site_name":"Som2ny Network","article_published_time":"2025-04-09T09:31:07+00:00","og_image":[{"width":1092,"height":204,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=178555#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=178555"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Universal Analytics: Weather As A Custom Dimension","datePublished":"2025-04-09T09:31:07+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=178555"},"wordCount":412,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=178555#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg","keywords":["Analytics","Custom","Dimension","Universal","Weather"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=178555#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=178555","url":"https:\/\/fivemor.com\/?p=178555","name":"Universal Analytics: Weather As A Custom Dimension - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=178555#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=178555#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg","datePublished":"2025-04-09T09:31:07+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=178555#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=178555"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=178555#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/04\/weather-custom-dimension.jpg","width":1092,"height":204},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=178555#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Universal Analytics: Weather As A Custom Dimension"}]},{"@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\/178555","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=178555"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/178555\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/178556"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178555"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=178555"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=178555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}