Updating Params

How to Update Params/Tokens on JS?

<script type="text/javascript">
kUrl='http://keitaro_url/';
function update_tokens(subId, token, value) {
  var img = document.createElement("img");
  img.src= kUrl + '?_update_tokens=1&sub_id=' + subId + '&'+ token + '=' + value + '&return=img';
  img.height=0;
  img.width=0;
  document.getElementsByTagName("body")[0].appendChild(img);
}
</script> 

Now, you can call such function:

update_tokens('{subid}', 'sub_id_8', 'test')

In case, the landing page is already using Tracking Script, you can just call this method:

KTracking.update({sub_id_8: 'test'})

How to Update Params/Tokens on PHP?

Add this code to your page:

session_start();
function updateParams($subId, $params) {
   $kUrl = 'TRACKER_URL'; 
   $url = $kUrl . '?_update_tokens=1&sub_id=' . urlencode($subId) . '&' . http_build_query($params);
   $result = file_get_contents($url);
   // echo $result;
}

Replace TRACKER_URL to tracker URL.

Now, you can call updateParams('sub_id', [params]);. Example:

updateParams($_SESSION['sub_id'], array('sub_id_1' => 'info@gmail.com'))