{"action":"created","issue":{"url":"https://api.github.com/repos/TMDer/trm/issues/4","labels_url":"https://api.github.com/repos/TMDer/trm/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/TMDer/trm/issues/4/comments","events_url":"https://api.github.com/repos/TMDer/trm/issues/4/events","html_url":"https://github.com/TMDer/trm/pull/4","id":71201747,"number":4,"title":"finish #13563:  增加回傳 tracking code 版本","user":{"login":"Vincentcdw","id":6203967,"avatar_url":"https://avatars.githubusercontent.com/u/6203967?v=3","gravatar_id":"","url":"https://api.github.com/users/Vincentcdw","html_url":"https://github.com/Vincentcdw","followers_url":"https://api.github.com/users/Vincentcdw/followers","following_url":"https://api.github.com/users/Vincentcdw/following{/other_user}","gists_url":"https://api.github.com/users/Vincentcdw/gists{/gist_id}","starred_url":"https://api.github.com/users/Vincentcdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vincentcdw/subscriptions","organizations_url":"https://api.github.com/users/Vincentcdw/orgs","repos_url":"https://api.github.com/users/Vincentcdw/repos","events_url":"https://api.github.com/users/Vincentcdw/events{/privacy}","received_events_url":"https://api.github.com/users/Vincentcdw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-27T07:26:03Z","updated_at":"2015-04-28T05:36:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/TMDer/trm/pulls/4","html_url":"https://github.com/TMDer/trm/pull/4","diff_url":"https://github.com/TMDer/trm/pull/4.diff","patch_url":"https://github.com/TMDer/trm/pull/4.patch"},"body":"## #13563 增加回傳 tracking code 版本\r\n\r\n### 任務目標\r\n1. 讓 trackind code 回傳目前版本，並且相容與舊版 tracking code。\r\n\r\n### 已完成項目\r\n(1)"},"comment":{"url":"https://api.github.com/repos/TMDer/trm/issues/comments/96919232","html_url":"https://github.com/TMDer/trm/pull/4#issuecomment-96919232","issue_url":"https://api.github.com/repos/TMDer/trm/issues/4","id":96919232,"user":{"login":"Vincentcdw","id":6203967,"avatar_url":"https://avatars.githubusercontent.com/u/6203967?v=3","gravatar_id":"","url":"https://api.github.com/users/Vincentcdw","html_url":"https://github.com/Vincentcdw","followers_url":"https://api.github.com/users/Vincentcdw/followers","following_url":"https://api.github.com/users/Vincentcdw/following{/other_user}","gists_url":"https://api.github.com/users/Vincentcdw/gists{/gist_id}","starred_url":"https://api.github.com/users/Vincentcdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vincentcdw/subscriptions","organizations_url":"https://api.github.com/users/Vincentcdw/orgs","repos_url":"https://api.github.com/users/Vincentcdw/repos","events_url":"https://api.github.com/users/Vincentcdw/events{/privacy}","received_events_url":"https://api.github.com/users/Vincentcdw/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T05:36:43Z","updated_at":"2015-04-28T05:36:43Z","body":"目前調整後，把新版跟原本的 Tracking Code 改爲一致\r\n如下：\r\n```\r\n!function(){return window.analytics={load:function(t){var n,e,o;document.getElementById(\"analytics-js\")||(n=document.createElement(\"script\"),n.type=\"text/javascript\",n.id=\"analytics-js\",n.async=!0,n.src=(\"https:\"===document.location.protocol?\"https://\":\"http://\")+\"//localhost:1337/trm.compile.js?1430199245608\",o=document.getElementsByTagName(\"script\")[0],o.parentNode.insertBefore(n,o)),e=window.onload,window.onload=function(){return e&&e(),t()}},VERSION:\"0.1.9\"}}();window.analytics.load(function () {\r\n  window.fbConversion.load();\r\n  window.analytics.initial(\"1\", \"129021990623229\");\r\n  window.analytics.send(\"\");\r\n});\r\n```\r\n\r\n另外雖然增加了 FB Conversion 的邏輯，但遇到舊的 code 一樣可以正常運作，在回傳的 param 增加一個 version，這個 version 會記錄目前送過來的 track data，是透過哪一個版本的 trm 觸發的，只有新版的才會去偵測是否有 conversion，如果是舊版則不會觸發這個邏輯。"}}