|Table of Content >> Basic Features >> Integrating Tracking Codes|
Integrating your AffiliateShop Sale Tracking Code
After you have created your AffiliateShop keyword to track the sales referred by your affiliates, the next step will be to integrate the AffiliateShop sale tracking code into your shopping cart script or payment processing script.
Different shopping carts (e.g. Americart, Miva) and payment processing agents (e.g. CCNow, WorldPay) require different implementation paths to effect the integration of the AffiliateShop Sale Tracking Code to their scripts or systems.
Hence, this page will state the instructions for integrating the AffiliateShop Sale Tracking Code if you are running your own custom shopping cart software and you have full access to the source code. Otherwise, if you are using a third party shopping cart or payment processing vendor, we will advise you to contact us at email@example.com for instructions on how to integrate our sale tracking code to your shopping cart/payment processing vendor. We are not able to list the instructions for integrating with third party solutions in this Primer due to the many number of third party solutions available today.
Read on if you intend to integrate our sale tracking code into your own custom shopping cart script.
Integration of the AffiliateShop Sale Tracking Code involves three phases, namely:
Phase I: Identifying the location in your script to insert our code
The AffiliateShop sale tracking code should be inserted into the portion of y our script that is responsible for generating the Order Receipt page. The Order Receipt page is commonly known also as the Thank You for Ordering page. In essence, this page will be displayed to the customer after his order has been successfully processed by your script.
To illustrate with an example: Let us say that you have an order form located at order.html. The customer will submit his card information and order details via this form. The form (<form action="processorder.asp" method="post">) will then POST the information to your script processorder.asp. The latter script file is responsible for validating the customer's entry and for submitting the card information to your backend database for batch processing. The "processorder.asp" file will then call "thankyou.asp" after the order has been verified and validated. The file "thankyou.asp" will display the Thank You for Ordering page to the customer.
You will need to insert the AffiliateShop Sale Tracking Code to the file "thankyou.asp".
Phase II: Correctly formatting the sale tracking code
After you have identified the location in the script file to embed the Affiliateshop Sale Tracking code, the next step will be to literally insert the HTML code into the script. A typical AffiliateShop sale tracking code format for tracking pay per % of sale is:
<!-- sale tracking code start -->
<img src="https://edge.affiliateshop.com/public/WIDLink?WID=######&OrderID=ORDERID&sale=AMOUNT" width=1 height=1>
<!-- sale tracking code end -->
where AMOUNT= Order Amount for the current transaction.
where ORDERID= The unique Transaction ID/Receipt No./Order No. generated by the payment system.
where ###### is your six digit WID number assigned to you by AffiliateShop.
* Note: The AMOUNT and ORDERID field name are examples. In your own script, you will use the corresponding variable names that match either of these values.
* Note: The keyword "sale" is stated as an example. It should be the same keyword as defined in your AffiliateShop Parameter Keyword page.
Phase III: Conducting a test
Read the section "Testing Integration Process" in Merchant Quick Start
Next:: Banner Creation