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: ER202041618MY

<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)">ER202041618MY</a>
<button onclick="linkTrack('200212739823')">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: "ER202041618MY"
  });
</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.
width No 450px Specify the tracking result width.
height No 625px Specify the tracking result height.