Track Button
This tracking widget allows site visitors to track shipment on your website
Input Mode
Add an input box on your website and click on the 'TRACK' button.
Preview:
Sample: ERC804027102MY
<input type="text" id="TrackNo" maxlength="50"> <input type="button" value="TRACK" onclick="inputTrack()"> <script src="//www.tracking.my/track-button.js"></script> <script> function inputTrack() { var num = document.getElementById("TrackNo").value; if(num===""){ alert("Please enter tracking number"); return; } TrackButton.track({ tracking_no: num }); } </script>
Link Mode
Add a link to your tracking number on your website.
Preview:
<a onclick="linkTrack(this.innerText)">ERC804027102MY</a> <button onclick="linkTrack('ERC804027102MY')">TRACK</button> <script src="//www.tracking.my/track-button.js"></script> <script> function linkTrack(num) { TrackButton.track({ tracking_no: num }); } </script>
Embed Mode
Add an embed to show tracking result on your website.
Preview:
<div id="embedTrack"></div> <script src="//www.tracking.my/track-button.js"></script> <script> TrackButton.embed({ selector: "#embedTrack", tracking_no: "ERC804027102MY" }); </script>
Parameter Reference
Parameter | Required | Default Value | Description |
---|---|---|---|
tracking_no | Yes | - | Specify the tracking number needed to be tracked. |
courier | No | - | Specify the courier company, default to auto detect. Get courier list at HERE. |
theme | No | light | Specify the theme, available option: "light", "dark" |
width | No | 450px | Specify the tracking result width. |
height | No | 625px | Specify the tracking result height. |