title: Chrome-Dev-Tool :- csm-hit cookie in Amazon
body: <p>I'm trying to set cookies while scraping Amazon to not get caught and look like an authentic user.</p>
  
  <p>I'm trying to replicate the behaviour of the website. I've completely analyzed the headers, the request and response signatures etc. The only thing which change is <code>cookies</code>, and that too <code>csm-hit</code> and <code>visitCount</code>. I understood the logic behind <code>visitCount</code> getting updated, but not <code>csm-hit</code>.</p>
  
  <p>Here's the <code>csm-hit</code> cookie.</p>
  
  <pre><code>tb:s-Y4SB9X78SYQB53MGCQWE|1551555477343&amp;t:1551555479805&amp;adb:adblk_no
  </code></pre>
  
  <p>It is of the below format:-</p>
  
  <pre><code>tb:s - ALPHANUMERIC | EPOCH_TIME &amp;t EPOCH_TIME &amp;adb:adblk_no
  </code></pre>
  
  <p>This alphanumeric characters (which looks like base64 encoded) keep changing. It calls a function <code>updateCsmHit</code> when reloading/redirecting out of the amazon, which then updates the <code>csm-hit</code> value and then re-use the same updated value next time when the request is being made to the server. If this cookie is not already saved in the browser, it does not send <code>csm-hit</code> in the request, but saves it the moment we step out of Amazon.</p>
  
  <p>I've anlyzed the complete source code using Chrome Dev tool, but unable to crack the logic of generating this alphanumeric value. </p>
  
  <ol>
  <li><p>I want to understand how this value is being generated so that I can use the same logic to replicate its generation? Can anyone please help me in this regard by using Chrome Dev tool.</p></li>
  <li><p>Does anyone know the significance of <code>csm-hit</code>?</p></li>
  </ol>
  
  <p>PS: Please don't advise me to use the same <code>csm-hit</code> everytime. I want to know how is this getting generated.</p>