Skip to content

Instantly share code, notes, and snippets.

@dreamline2
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dreamline2/3e869990a843fa175790 to your computer and use it in GitHub Desktop.
Save dreamline2/3e869990a843fa175790 to your computer and use it in GitHub Desktop.
轉換事件嵌入碼
<script type="text/javascript">
var TCGA = TCGA || {};
TCGA.cthouseProductId = $(".c5").text().match(/\d*/g).join("");
TCGA.cthouseProductName = $(".c5").text().split(/\(/)[0];
TCGA.time = new Date();
TCGA.timeStamp = TCGA.time.getFullYear() + '/' + (TCGA.time.getMonth() + 1) + '/' + TCGA.time.getDate() + '::' + (TCGA.time.getHours());
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-10600360-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
_gaq.push(['_trackEvent', 'click', '#saveHouseAppoint::' + TCGA.timeStamp, '1']);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment