Quick debugging with Sale requests log

Since version 5.4.43.2 of Post Affiliate Pro we have added a useful new option which you can find in your merchant panel under Tools->Sale requests log. The screenshot below shows you an example of how this feature works and why is it useful.

 

How does it work?

Every time some sale tracking code is executed using:

a request is sent to PAP and PAP tries to create a commission based on the request parameters and based on your PAP settings. Thanks to this feature all the received requests are saved in PAP. Before this option was added the sale tracking request would be saved only in Tools->Event logs and only if you had logging for Sales enabled in Configuration->Event logging.

 

There are 3 main advantages of the constant saving of all tracking requests brought:

  1. You can easily see if your sale tracking integration is able to notify your PAP. If it is you see the requests in the table, if it isn't then you won't see any requests and you know something is wrong with your code.
  2. You can easily see why a commission for some particular order wasn't saved. The reason is saved in the Message field and should help you debug your settings and tracking problems without a closer inspection of the Event logs.
  3. You can restart a request. We had multiple customers in the past who had done some kind of misconfiguration like for example setting a campaign to be private without inviting the affiliates into it. In those times all the commissions these affiliates should have received, but due to the misconfiguration did not, were lost. With this feature, you can simply correct your configuration and then restart the unsaved tracking requests to have the commissions saved.

 

How does it help with debugging?

One word answer - immensely. Let's say you have doubts about whether the software is tracking, no commissions are saved for your test orders or you have one particular order which wasn't tracked. Here is how we would debug it:

We need to take into account that if your installation is running with cron job then it takes 2-3 cron job runs before a commission is saved.
On hosted with us accounts it takes 5-15 minutes for the commission to appear after an order was placed. It would take the same time for the Sale requests log to display the request.
You can speed this up by forcing the requests to process.
  1. Look into Tools->Sale requests log and see if you see a log for your test order there. You would see the order ID in the Sale params column after the "o": , you can also use search.
    1. If you can see your order on the list then continue with step 2.
    2. If you can't see the order on the list have a look at whether there are at least some other orders in the list.
      1. if you can't see any other order in the list and you are sure you have already integrated your website, then your sale tracking integration isn't working. It cannot communicate with your PAP so you need to investigate what might be wrong with the code, for that continue by debugging the sale tracking code.
      2. if you can see other orders and you can't see just the one then there are a couple of options:
        1. Post Affiliate Pro server was temporarily unavailable to receive the request.
        2. The customer who placed the order is using AdBlock or a similar solution that blocked the execution of the script.
        3. The order was done via a different payment method which doesn't follow the usual procedure and your default integration was skipped so the tracking script was not executed.
          For example, if your integration relies on a thank you page visit, the thank you page might not have been visited. That could happen for example if you are using PayPal Standard as a payment processor or any other processor which takes the customer outside of your shopping cart to finish the order without automatically and immediately redirecting the customer back to the thank you page.
  2. If in Status you see Processed then the commission was saved and you should see it in Transactions->Commissions screen. If you see Unprocessed then it wasn't processed and you are interested in seeing what is in the Message column. The message is usually pretty self-explanatory however you can also consult the list of most common error messages. You can also click the Group ID there to display the Event logs of this particular sale requests so you can read through how it was being saved.

 

Description of columns

  • ID - incremented ID of the request under which was saved in this log.
  • Visit date - date and time of the request.
  • Status - whether the commission was saved or not.
  • Sale params - the request which was received. The abbreviations are explained here.
  • Message - success or failure message.
  • Retry number - number of times the request was executed, incremented when you use the Restart action.
  • Last retry - time of the last restart.
  • Log group - ID of the log group using which you can find all the logs for saving of this particular request in Tools->Event logs. Of course only if logging for Sales was enabled in Configuration->Event logging.
  • Actions - options to restart or to delete a request (nor commission nor event logs are deleted).

Additional columns:

  • Account ID - id of the Network account.
  • Visitor ID - id of the visitor/customer
  • URL - URL at which the sale tracking code was executed
  • Referrer - HTTP_REFERRER, where did the customer get to the thank you page from
  • IP - IP address of the machine which triggered the request
  • User agent - user agent of the machine which triggered the request
  • Track method - where did we get the Visitor ID from
×