Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save williesmithchen/d48b7167715324e19e96087b9cfba1da to your computer and use it in GitHub Desktop.

Select an option

Save williesmithchen/d48b7167715324e19e96087b9cfba1da to your computer and use it in GitHub Desktop.
台哥大_來源
<!DOCTYPE html PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-20000063-14', 'auto');
// ^^^^^^^^^^^^^^^^
// 依照大小網調整
ga(function(tracker){
var targetUrl = 'https://www.catch.net.tw/auth/myfoneshopping_login_full.jsp?return_url=https%3A%2F%2Fwww.myfone.com.tw%2Fbuy%2Fbackground%2Fbg.sso_receiver.php&from_ch=NEWEC&cancel_return_url=https%3A%2F%2Fwww.myfone.com.tw%2Fbuy%2Findex.php%3Faction%3Dshopping_cart%26web_cart_myAct%3DSHOPPING_CART%26ba_pf%3Dbuy%26ba_p%3Dtop%26ba_piu%3D%26ba_pi%3Dshopping_cart%26ba_cp%3D%E8%B3%BC%E7%89%A9%E8%BB%8A&b_action=shopping_cart_%26cart_myAct%3DCHECK_OUT';
// ^^^^^^^^^^^^^^^^ ->
// 此處內容照原本動態產生的網址,若不是動態的就直接貼上
// 這邊是以未登入者,將商品加入購物車,並點擊前往購物車時,此處會產生的網址做舉例
var separator = (targetUrl.indexOf("?")===-1)?"?":"&", newParam=separator + "clientId=" + tracker.get('clientId');
var newUrl=targetUrl.replace(newParam,"");
newUrl+=newParam;
window.top.location.href = newUrl
});
</script>
</head>
<body></body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment