How do I pre-input tracking number in Track Button?

Track Button - pre-input Tracking Number - View Demo

By adding a parameter for tracking number in the Track Button code, you can allow your site visitors to click and view delivery information without inputting tracking number.

Add parameter for tracking number

 data-tracking-number="12345678"

Add Track Button to your site

Include the follow javascript on your page once, ideally right after the opening <body> tag.
<div id="as-root"></div><script>(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n))return;r=e.createElement(t);r.id=n;r.src="//button.aftership.com/all.js";i.parentNode.insertBefore(r,i)})(document,"script","aftership-jssdk")</script>
Copy and paste the code below into your page between the <body> and </body> tags.
The buttons will appear whatever you place them.
<div data-domain="track.aftership.com" data-tracking-number="12345678" data-size="large" class="as-track-button"></div>
Remember to login to your AfterShip account >  apps >  Track Button for custom style. You can also replace  data-domain="track.aftership.com" with your AfterShip username or custom domain to display tracking results, and apply your carrier settings. 

Still need help? Contact Us Contact Us