POST Request Tracking

There are two ways to send data between servers over HTTP: GET and POST. A GET request works by loading a URL with all the parameters in the query string. A POST request works by submitting parameters in the head instead of in the query string. This article shows how you can use POST requests to handle click and conversion tracking.

The action URL for all POSTS would be the part of the URL before the start of the query string specified by “?”. Any parameters after the “?” must be specified as form values.

Using POST Requests

To trigger a tracking link or conversion link via POST request, you can use an HTML form and use input fields to store query string parameters. Use a separate input field for each parameter of the tracking link or conversion link.

Here’s a tracking link and an example of triggering it via POST request:

http://demo.go2cloud.org/aff_c?offer_id=462&aff_id=1091&aff_sub=id1&source=g1
<form action="http://demo.go2cloud.org/aff_c" method="post">
  <input id="offer_id" value="462" type="text" />
  <input id="aff_id" value="1091" type="text" />
  <input id="aff_sub" value="id1" type="text" />
  <input id="source" value="g1" type="text" />
  <input type="submit" />
</form>

Using POST Requests with Encrypted Links

For encrypted links, include the hashed value from the base URL path. For example, here’s an encrypted conversion link and an example of triggering it via POST request:

http://demo.go2cloud.org/SH1?aff_sub=id1
<form action="http://demo.go2cloud.org/SH1" method="post">
  <input id="adv_sub" value="order1" type="text" />
  <input id="redirect" value="http://support.hasoffers.com/" type="text" />
  <input type="submit" />
</form>

Conversion Link Redirects

By default, conversion links just load a page with the results of tracking the conversion—they don’t redirect a user. To redirect a user after the conversion is tracked, use the “redirect” (for non-encoded URLs) or “eredirect” parameter (for encoded URLs).

For example, you want to redirect a user to the following URL on conversion:

http://www.hasoffers.com

To redirect to the above URL, you can use the URL-encoded version stored in the “eredirect” parameter:

<form action="http://demo.go2cloud.org/aff_l" method="post">
  <input id="offer_id" value="462" type="text" />
  <input id="adv_sub" value="order1" type="text" />
  <input id="eredirect" value="http%3A%2F%2Fwww.hasoffers.com" type="text" />
  <input type="submit" />
</form>

No Comments

Leave a reply