{"id":335,"date":"2015-12-11T10:18:33","date_gmt":"2015-12-11T01:18:33","guid":{"rendered":"http:\/\/www.cotegg.com\/blog\/?p=335"},"modified":"2015-12-11T10:18:33","modified_gmt":"2015-12-11T01:18:33","slug":"%e3%80%90ionic%e3%80%91cannot-read-property-starttrackerwithid-of-undefined-%e3%81%a0%e3%81%a8%e3%82%88","status":"publish","type":"post","link":"https:\/\/www.cotegg.com\/blog\/?p=335","title":{"rendered":"\u3010ionic\u3011Cannot read property &#8216;startTrackerWithId&#8217; of undefined \u3060\u3068\u3088"},"content":{"rendered":"<p>\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002<\/p>\n<p>GoogleAnalytics\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5c0e\u5165\u3057\u305f\u306e\u3067\u3059\u304c\u3001Android\u5b9f\u6a5f\u3067\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nCannot read property &#039;startTrackerWithId&#039; of undefined\n<\/pre>\n<p>\u3093\u301c\u3001iOS\u3067\u306f\u52d5\u3044\u305f\u306e\u306b\u306a\u3093\u3067\u3058\u3083\u308d\u3002<\/p>\n<p>\u3063\u3066\u611f\u3058\u3067\u8272\u3005\u8abf\u3079\u3066\u305f\u3089\u3001 <code>ngCordova<\/code> \u304cDI\u3067\u304d\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u5224\u660e\uff01<\/p>\n<p>GoogleAnalytics\u306e\u5b9f\u88c5\u306f\u5225\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u5206\u3051\u3066\u3044\u3066\u3001<br \/>\n\u305d\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u306b <code>ngCordova<\/code> \u306eDI\u304c\u5fc5\u8981\u3060\u3063\u305f\u3093\u3067\u3059\u306d\u3002<br \/>\n\uff08\u5927\u5143\u306eJS\u3067DI\u3057\u3066\u305f\u3093\u3067\u554f\u984c\u306a\u3044\u304b\u3068\u601d\u3063\u3066\u305f\u306e\u3067\u3059\u304c\u3002\u3002\uff09<\/p>\n<pre class=\"brush: jscript; title: analytics.js; notranslate\" title=\"analytics.js\">\r\nangular.module('services.analytics', ['ngCordova'])\r\n\r\n.factory('GAnalytics',\r\n  ['$cordovaGoogleAnalytics', function($cordovaGoogleAnalytics){\r\n    return {\r\n      startTrackerWithId : function() {\r\n        $cordovaGoogleAnalytics.startTrackerWithId('UA-66195554-1');\r\n      },\r\n      setUserId : function(member_id) {\r\n        $cordovaGoogleAnalytics.setUserId(member_id);\r\n      },\r\n      trackView : function(screen_name) {\r\n        console.log('GA: ' + screen_name);\r\n        $cordovaGoogleAnalytics.trackView(screen_name);\r\n      }\r\n    }\r\n}]);\r\n<\/pre>\n<p>\u5143\u306f1\u884c\u76ee\u306e <code>'ngCordova'<\/code> \u304c\u306a\u304b\u3063\u305f\u3093\u3067\u3059\u3002<br \/>\n\u3057\u304b\u3057iOS\u3067\u52d5\u304f\u306e\u306f\u4f55\u6545\u3060\u308d\u3046\u3002\u3002\u3068\u3044\u3046\u7591\u554f\u3092\u6a2a\u76ee\u306b\u4eca\u56de\u306e\u554f\u984c\u306f\u89e3\u6c7a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002 GoogleAnalytics\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5c0e\u5165\u3057\u305f\u306e\u3067\u3059\u304c\u3001A &#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[7],"tags":[10,11],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010ionic\u3011Cannot read property &#039;startTrackerWithId&#039; of undefined \u3060\u3068\u3088 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4<\/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:\/\/www.cotegg.com\/blog\/?p=335\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010ionic\u3011Cannot read property &#039;startTrackerWithId&#039; of undefined \u3060\u3068\u3088 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"og:description\" content=\"\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002 GoogleAnalytics\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5c0e\u5165\u3057\u305f\u306e\u3067\u3059\u304c\u3001A ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cotegg.com\/blog\/?p=335\" \/>\n<meta property=\"og:site_name\" content=\"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/COTegg.japan\/\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-11T01:18:33+00:00\" \/>\n<meta name=\"author\" content=\"\u4e2d\u7530 \u6b69\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:site\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u4e2d\u7530 \u6b69\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=335#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=335\"},\"author\":{\"name\":\"\u4e2d\u7530 \u6b69\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef\"},\"headline\":\"\u3010ionic\u3011Cannot read property &#8216;startTrackerWithId&#8217; of undefined \u3060\u3068\u3088\",\"datePublished\":\"2015-12-11T01:18:33+00:00\",\"dateModified\":\"2015-12-11T01:18:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=335\"},\"wordCount\":72,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"keywords\":[\"angularjs\",\"ionic\"],\"articleSection\":[\"\u6280\u8853\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=335#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=335\",\"url\":\"https:\/\/www.cotegg.com\/blog\/?p=335\",\"name\":\"\u3010ionic\u3011Cannot read property 'startTrackerWithId' of undefined \u3060\u3068\u3088 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\"},\"datePublished\":\"2015-12-11T01:18:33+00:00\",\"dateModified\":\"2015-12-11T01:18:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=335#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=335\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=335#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cotegg.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010ionic\u3011Cannot read property &#8216;startTrackerWithId&#8217; of undefined \u3060\u3068\u3088\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"name\":\"COTegg\u306e\u30d0\u30b1\u30c4\",\"description\":\"- Bucket of cotegg -\",\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\",\"name\":\"COTegg Inc.\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"contentUrl\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"width\":176,\"height\":60,\"caption\":\"COTegg Inc.\"},\"image\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/COTegg.japan\/\",\"https:\/\/twitter.com\/cotegg_japan\",\"https:\/\/www.instagram.com\/cotegg_japan\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef\",\"name\":\"\u4e2d\u7530 \u6b69\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g\",\"caption\":\"\u4e2d\u7530 \u6b69\"},\"sameAs\":[\"http:\/\/www.cotegg.com\"],\"url\":\"https:\/\/www.cotegg.com\/blog\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010ionic\u3011Cannot read property 'startTrackerWithId' of undefined \u3060\u3068\u3088 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","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.cotegg.com\/blog\/?p=335","og_locale":"ja_JP","og_type":"article","og_title":"\u3010ionic\u3011Cannot read property 'startTrackerWithId' of undefined \u3060\u3068\u3088 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","og_description":"\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002 GoogleAnalytics\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5c0e\u5165\u3057\u305f\u306e\u3067\u3059\u304c\u3001A ...","og_url":"https:\/\/www.cotegg.com\/blog\/?p=335","og_site_name":"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","article_publisher":"https:\/\/www.facebook.com\/COTegg.japan\/","article_published_time":"2015-12-11T01:18:33+00:00","author":"\u4e2d\u7530 \u6b69","twitter_card":"summary_large_image","twitter_creator":"@cotegg_japan","twitter_site":"@cotegg_japan","twitter_misc":{"\u57f7\u7b46\u8005":"\u4e2d\u7530 \u6b69"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cotegg.com\/blog\/?p=335#article","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=335"},"author":{"name":"\u4e2d\u7530 \u6b69","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef"},"headline":"\u3010ionic\u3011Cannot read property &#8216;startTrackerWithId&#8217; of undefined \u3060\u3068\u3088","datePublished":"2015-12-11T01:18:33+00:00","dateModified":"2015-12-11T01:18:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=335"},"wordCount":72,"commentCount":0,"publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"keywords":["angularjs","ionic"],"articleSection":["\u6280\u8853"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cotegg.com\/blog\/?p=335#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cotegg.com\/blog\/?p=335","url":"https:\/\/www.cotegg.com\/blog\/?p=335","name":"\u3010ionic\u3011Cannot read property 'startTrackerWithId' of undefined \u3060\u3068\u3088 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/#website"},"datePublished":"2015-12-11T01:18:33+00:00","dateModified":"2015-12-11T01:18:33+00:00","breadcrumb":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=335#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cotegg.com\/blog\/?p=335"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cotegg.com\/blog\/?p=335#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cotegg.com\/blog"},{"@type":"ListItem","position":2,"name":"\u3010ionic\u3011Cannot read property &#8216;startTrackerWithId&#8217; of undefined \u3060\u3068\u3088"}]},{"@type":"WebSite","@id":"https:\/\/www.cotegg.com\/blog\/#website","url":"https:\/\/www.cotegg.com\/blog\/","name":"COTegg\u306e\u30d0\u30b1\u30c4","description":"- Bucket of cotegg -","publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.cotegg.com\/blog\/#organization","name":"COTegg Inc.","url":"https:\/\/www.cotegg.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","contentUrl":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","width":176,"height":60,"caption":"COTegg Inc."},"image":{"@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/COTegg.japan\/","https:\/\/twitter.com\/cotegg_japan","https:\/\/www.instagram.com\/cotegg_japan\/"]},{"@type":"Person","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef","name":"\u4e2d\u7530 \u6b69","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g","caption":"\u4e2d\u7530 \u6b69"},"sameAs":["http:\/\/www.cotegg.com"],"url":"https:\/\/www.cotegg.com\/blog\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/335"}],"collection":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=335"}],"version-history":[{"count":2,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions"}],"predecessor-version":[{"id":337,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions\/337"}],"wp:attachment":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}