{"id":1074,"date":"2016-10-17T09:36:13","date_gmt":"2016-10-17T07:36:13","guid":{"rendered":"http:\/\/blog.thecodecampus.de\/?p=1074"},"modified":"2023-12-20T20:21:37","modified_gmt":"2023-12-20T19:21:37","slug":"angularjs-1-set-google-analytics-google-tag-manager","status":"publish","type":"post","link":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/","title":{"rendered":"AngularJS 1: Set up Google Analytics with Google Tag Manager"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">There are many modules to include Google Analytics into your AngularJS project. But actually this overhead is not really required since a plain implementation is only a few lines of code. So you can spare extra modules.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">I highly recommend you to use Google Tag Manager in order to place the tracking information on your site since it allows you to have a professional workflow. Beyond that you can enjoy the advantages of having a versioned history of your changes. Additional many things are way more easier with Google Tag Manager, for example to implement a simple cookie opt-out that affects all implemented tracking codes.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/blog.thecodecampus.de\/angular-2-google-analytics-google-tag-manager\/\" target=\"_blank\" rel=\"noopener noreferrer\">? Tutorial for <strong>Google Analytics with<\/strong>\u00a0<strong>Angular 2\u00a0<\/strong><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Recently we had to implement Analytics on our new site for our German TypeScript User Group ( www.typescriptusers.de ). The first step is to create Account and a Container on Google Tag Manager ( <\/span><a href=\"https:\/\/tagmanager.google.com\"><span style=\"font-weight: 400;\">tagmanager.google.com<\/span><\/a><span style=\"font-weight: 400;\"> ).<\/span><\/p>\n<p><a href=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-935\" src=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png\" alt=\"GTM1\" width=\"754\" height=\"772\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM1.png 754w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM1-293x300.png 293w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">On confirm you will receive the tracking snippet that you should place on in your index.html. Since we rely on this code in execution time it is required that you place the code directly under the the opening &lt;body&gt; tag of your HTML File. It is recommended to place your custom javascript files after the implementation of GTM or use defer attribute on the script tags.<br \/>\n<\/span>Once you have added the code to your site it is time for the first publish of your empty container. Until you publish your Tag Manager snippet will only cause an loading error. Use the publish Button on the upper right corner of GTM.<\/p>\n<p><a href=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-934\" src=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM2.png\" alt=\"GTM2\" width=\"1248\" height=\"331\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM2.png 1248w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM2-300x80.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM2-768x204.png 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM2-1024x272.png 1024w\" sizes=\"auto, (max-width: 1248px) 100vw, 1248px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Alright. Let\u2019s set up Google Analytics. The first thing to do is to create a property in GA and copy the UA-ID.<\/span><\/p>\n<p><a href=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-933\" src=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM3.png\" alt=\"GTM3\" width=\"774\" height=\"367\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM3.png 774w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM3-300x142.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM3-768x364.png 768w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In GTM Tracking codes are implemented as <\/span><b><i>Tags<\/i><\/b><span style=\"font-weight: 400;\">. So when you want to add Facebook\u2019s Tracking \u00a0Pixel you\u2019d simply create a new tag for it and bind it to a <\/span><b><i>Trigger<\/i><\/b><span style=\"font-weight: 400;\"> (pageview, click, form submission,..) to fire on. Lets create our first tag for Analytics, fill the form as seen in the screenshot below. But keep in mind to use your own UA-ID. Leave the \u201cFire On\u201d empty for now. We need to create a trigger first. \u00a0<\/span><\/p>\n<p><a href=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-932\" src=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM4.png\" alt=\"GTM4\" width=\"924\" height=\"925\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM4.png 924w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM4-150x150.png 150w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM4-300x300.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM4-768x769.png 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Alright our tracking snippet is now included but will never be fired since there is no trigger. On AngularJS sites we have no real pageview (hard reload) but only state changes that do not trigger the browser reload. This means we have to implement the trigger on our own. This is not Google Tag Manager specific but applies for all fully JavaScript driven pages! Go to GTM and create a new trigger of type <\/span><i><span style=\"font-weight: 400;\">Custom Event<\/span><\/i><span style=\"font-weight: 400;\">. Call it \u201cRoute Change\u201d.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Note: <\/strong>If you are using HTML Mode: Then there is no need to create a custom trigger for PageView, and it gets even better, you can also skip the code adjustment! Just create a trigger and select &#8220;History Change&#8221; as type. Call him &#8220;Route Change&#8221; and make sure to connect\u00a0tag and trigger as seen in the second screenshot below. That is it for you. Publish and you are all set.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-931\" src=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM5.png\" alt=\"GTM5\" width=\"791\" height=\"677\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM5.png 791w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM5-300x257.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM5-768x657.png 768w\" sizes=\"auto, (max-width: 791px) 100vw, 791px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">The trigger will later be called from our AngularJS code, then the trigger will call all connected tags. So you are no longer required to add Google Analytics directly to your application but just to GTM. If you want to add another tracking tool you can reuse the trigger. So let&#8217;s connect them by editing the Google Analytics Tag. Change the \u201cFire On\u201d -&gt; \u201cMore\u201d -&gt; \u201cRoute Change\u201d. \u00a0Then save the tag and publish your changes by using the publish button in the upper red corner.<\/span><\/p>\n<p><a href=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-930\" src=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM6.png\" alt=\"GTM6\" width=\"1241\" height=\"915\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM6.png 1241w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM6-300x221.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM6-768x566.png 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2016\/07\/GTM6-1024x755.png 1024w\" sizes=\"auto, (max-width: 1241px) 100vw, 1241px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Now we have set up GTM and GA. We\u00a0have to send the page view event our Route Change\u201d trigger is listening for. To do so we subscribe to the\u00a0AngularJS routers change stateChangeSuccess event. To send data to GTM we make use of the DataLayer array GTM has attached to our window object. GTM will watch it for changes and send the data to the triggers. Add this configuration either to your root module run method or to your AppCtrl.\u00a0<\/span><\/p>\n<pre class=\"lang:default decode:true\" title=\"AppCtrl or module.run\">function AppCtrl($rootScope,  $location) {\r\n    $rootScope.$on('$stateChangeSuccess', function (event, toState) {\r\n        window.dataLayer.push({\r\n            event: 'pageView',\r\n            action: $location.path(),\r\n        });\r\n    });\r\n}\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">This tutorial applies not only to Google Tag Manager and Google Analytics but to all tracking tools that can be connected to GTM. So you can add Piwik, Facebook, AdWords Tracking, Crazyegg, and many more without even touching your application&#8217;s source code once.\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many modules to include Google Analytics into your AngularJS project. But actually this overhead is not really required since a plain implementation is only a few lines of code. So you can spare extra modules. I highly recommend you to use Google Tag Manager in order to place the tracking information on your [&#8230;]<br \/><a class=\"meta-big\" href=\"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/\"> READ MORE<\/a><\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[],"class_list":["post-1074","post","type-post","status-publish","format-standard","hentry","category-angularjs","category-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AngularJS 1: Set up Google Analytics with Google Tag Manager - Web Development Blog<\/title>\n<meta name=\"description\" content=\"Elevate AngularJS analytics. Set Google Analytics and Tag Manager effortlessly. Enhance tracking precision, insights. Supercharge your app now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AngularJS 1: Set up Google Analytics with Google Tag Manager - Web Development Blog\" \/>\n<meta property=\"og:description\" content=\"Elevate AngularJS analytics. Set Google Analytics and Tag Manager effortlessly. Enhance tracking precision, insights. Supercharge your app now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development tips and tricks - theCodeCampus Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-17T07:36:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-20T19:21:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png\" \/>\n<meta name=\"author\" content=\"theCodeCampus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"theCodeCampus\" \/>\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:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/\"},\"author\":{\"name\":\"theCodeCampus\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/276bbda2f8da73154f22fb652201cfbc\"},\"headline\":\"AngularJS 1: Set up Google Analytics with Google Tag Manager\",\"datePublished\":\"2016-10-17T07:36:13+00:00\",\"dateModified\":\"2023-12-20T19:21:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/\"},\"wordCount\":738,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2016\\\/07\\\/GTM1.png\",\"articleSection\":[\"AngularJS 1\",\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/\",\"name\":\"AngularJS 1: Set up Google Analytics with Google Tag Manager - Web Development Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2016\\\/07\\\/GTM1.png\",\"datePublished\":\"2016-10-17T07:36:13+00:00\",\"dateModified\":\"2023-12-20T19:21:37+00:00\",\"description\":\"Elevate AngularJS analytics. Set Google Analytics and Tag Manager effortlessly. Enhance tracking precision, insights. Supercharge your app now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2016\\\/07\\\/GTM1.png\",\"contentUrl\":\"https:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2016\\\/07\\\/GTM1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angularjs-1-set-google-analytics-google-tag-manager\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AngularJS 1: Set up Google Analytics with Google Tag Manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"name\":\"Web Development tips and tricks - theCodeCampus Blog\",\"description\":\"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\",\"name\":\"theCodeCampus\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"width\":156,\"height\":156,\"caption\":\"theCodeCampus\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/276bbda2f8da73154f22fb652201cfbc\",\"name\":\"theCodeCampus\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"caption\":\"theCodeCampus\"},\"description\":\"Our knowledge is not simply gained through reading - it is trained, tested and constantly being expanded. Because first and foremost, we are all developers at W11K. The know-how that we acquire here as developers, consultants and information architects flows immediately into our training courses and articles for theCodeCampus.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/thecodecampus\\\/\"],\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AngularJS 1: Set up Google Analytics with Google Tag Manager - Web Development Blog","description":"Elevate AngularJS analytics. Set Google Analytics and Tag Manager effortlessly. Enhance tracking precision, insights. Supercharge your app now!","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:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/","og_locale":"en_US","og_type":"article","og_title":"AngularJS 1: Set up Google Analytics with Google Tag Manager - Web Development Blog","og_description":"Elevate AngularJS analytics. Set Google Analytics and Tag Manager effortlessly. Enhance tracking precision, insights. Supercharge your app now!","og_url":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/","og_site_name":"Web Development tips and tricks - theCodeCampus Blog","article_published_time":"2016-10-17T07:36:13+00:00","article_modified_time":"2023-12-20T19:21:37+00:00","og_image":[{"url":"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png","type":"","width":"","height":""}],"author":"theCodeCampus","twitter_card":"summary_large_image","twitter_misc":{"Written by":"theCodeCampus","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#article","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/"},"author":{"name":"theCodeCampus","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/276bbda2f8da73154f22fb652201cfbc"},"headline":"AngularJS 1: Set up Google Analytics with Google Tag Manager","datePublished":"2016-10-17T07:36:13+00:00","dateModified":"2023-12-20T19:21:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/"},"wordCount":738,"commentCount":2,"publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png","articleSection":["AngularJS 1","JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/","url":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/","name":"AngularJS 1: Set up Google Analytics with Google Tag Manager - Web Development Blog","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#primaryimage"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png","datePublished":"2016-10-17T07:36:13+00:00","dateModified":"2023-12-20T19:21:37+00:00","description":"Elevate AngularJS analytics. Set Google Analytics and Tag Manager effortlessly. Enhance tracking precision, insights. Supercharge your app now!","breadcrumb":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#primaryimage","url":"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png","contentUrl":"https:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2016\/07\/GTM1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.thecodecampus.de\/blog\/angularjs-1-set-google-analytics-google-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.thecodecampus.de\/blog\/"},{"@type":"ListItem","position":2,"name":"AngularJS 1: Set up Google Analytics with Google Tag Manager"}]},{"@type":"WebSite","@id":"https:\/\/www.thecodecampus.de\/blog\/#website","url":"https:\/\/www.thecodecampus.de\/blog\/","name":"Web Development tips and tricks - theCodeCampus Blog","description":"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.","publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.thecodecampus.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.thecodecampus.de\/blog\/#organization","name":"theCodeCampus","url":"https:\/\/www.thecodecampus.de\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","width":156,"height":156,"caption":"theCodeCampus"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/276bbda2f8da73154f22fb652201cfbc","name":"theCodeCampus","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","caption":"theCodeCampus"},"description":"Our knowledge is not simply gained through reading - it is trained, tested and constantly being expanded. Because first and foremost, we are all developers at W11K. The know-how that we acquire here as developers, consultants and information architects flows immediately into our training courses and articles for theCodeCampus.","sameAs":["https:\/\/www.linkedin.com\/showcase\/thecodecampus\/"],"url":"https:\/\/www.thecodecampus.de\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/comments?post=1074"}],"version-history":[{"count":11,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1074\/revisions"}],"predecessor-version":[{"id":2176,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1074\/revisions\/2176"}],"wp:attachment":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media?parent=1074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/categories?post=1074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/tags?post=1074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}