TrackThePack
Documentation
This is the documentation for the commercial version of TrackThePack. Below are the details on integrating the commercial version of TrackThePack in to your site.
Integration
Step 1. Create a page on your site
TrackThePack functions separate from the trackthepack.com site in that your users never need to go to trackthepack.com. Functionality is completely contained to your site.
There are multiple ways to create an area of your site for package tracking. A page such as an order status would be a great place for the tracking information.
The code can be embedded literally anywhere on your site and can be moved at any time.
Step 2. Embed the code
Login to your account and on the front page you will see your embed code. Copy and paste that code on your site where you would like the tracking information to appear.
Step 3. Insert a tracking number
How you go about this last step will depend on how you integrate TrackThePack with your application. Most likely you will be inserting the number dynamically (with something like PHP, Ruby, Python, etc etc). If you do not insert a tracking number a simple text input field will be shown that will let the user manually input their number.
Customization
Below are the current listing of variables you can use to customize your TrackThePack installation.
The only required variables are ttp_number and ttp_key. See the table below for an explanation of each variable.
Variables
| Parameter | Value | Required? | Description |
|---|---|---|---|
| ttp_number | string | Yes | The actual tracking number of the package you are tracking. |
| ttp_key | string | Yes | This is your unique key for your account. Do not edit or remove. |
| ttp_width | positive integer | No | Sets the width of the iframe that is used to embed the tracking info. Defaults to 575. |
| ttp_height | positive integer | No | Sets the height of the iframe that is used to embed the tracking info. Defaults to 700. |
| ttp_css | absolute url | No | Adds a link to an additional CSS file if you would like to further customize the look of the application. |
| ttp_m_width | positive integer | No | Sets the width of the map. Defaults to 260. |
| ttp_m_height | positive integer | No | Sets the height of the map. Defaults to 200. |
How to add/remove variables
The best way to show how to do this is to just give you an example with all of the variables...so here you go.
var ttp_number = "1234567890";
var ttp_width = 850;
var ttp_height = 650;
var ttp_css = "http://example.com/stylesheet.css";
var ttp_m_width = 260;
var ttp_m_height = 200;
// Do not edit below
var ttp_key="123456abcxzy";(function(){document.write('<div id="ttp"></div>');s=document.createElement('script');s.type="text/javascript";s.src="http://trackthepack.dev:9999/javascript/embed.js?" + Math.random();setTimeout("document.getElementById('ttp').appendChild(s);",1);})()
</script>
Error Messages
Error 100: Invalid key and domain combination
To ensure your tracking credits are only used by you, we make sure the tracking code is only used on the domains you specify. If you are getting this message you need to make sure the "Domain" setting in your Account area has the domain you are wanting to show the tracking information on.
Error 200: Insufficient credits
Your account has run out of credits. To continue showing tracking information you will need to purchase more credits.