Autofill Tracking Number on the Order History Page
By adding a data-tracking-number field to the track button code, you can auto-populate the tracking number and allow shoppers to view their order status with just a click.
Login to your store > Select page to add Track Button > Edit HTML code
Copy and paste the code below after <body> tag
You can also replace data-domain=”track.aftership.com” with AfterShip username or custom domain and apply your carrier settings.
💻 Pre-input tracking number
Login to your store > Select page to add Track Button > Edit HTML code
Copy and paste the code below after <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>
<div data-domain="track.aftership.com" data-tracking-number="12345678" data-size="large" class="as-track-button"></div>
You can also replace data-domain=”track.aftership.com” with AfterShip username or custom domain and apply your carrier settings.
Updated on: 07/10/2022
Thank you!