{"id":4222,"date":"2026-11-29T07:38:57","date_gmt":"2026-11-28T23:38:57","guid":{"rendered":"https:\/\/www.hitsteps.com\/blog\/?p=4222"},"modified":"2026-11-29T07:41:29","modified_gmt":"2026-11-28T23:41:29","slug":"how-to-verify-the-hitsteps-tracking-script-on-your-website","status":"publish","type":"post","link":"https:\/\/www.hitsteps.com\/blog\/how-to-verify-the-hitsteps-tracking-script-on-your-website\/","title":{"rendered":"How to verify the Hitsteps tracking script on your website"},"content":{"rendered":"<p>You paste one line of code into your site and the numbers start showing up: visitors, pages, referrers, live views. Most site owners never look behind that line again. If you are choosing a tracking tool, or you need to answer a security reviewer who asks what script your visitors actually run, there is one check worth doing. It takes about ten minutes, needs no account, and you can repeat it any time.<\/p>\n<p>Here is the short version. Your page loads a small script from a Hitsteps host. Inside that script lives the shared tracking engine, as one contiguous block of bytes, with a site-specific settings block in front of it and a short trailing section after it. Hitsteps publishes a fingerprint file for every release. You save the exact response your page fetched, download the engine file that the fingerprint describes, and check that those engine bytes appear, byte for byte, inside your saved response. When they do, the bytes in the response your page fetched embed exactly the engine Hitsteps published.<\/p>\n<h2>What your page actually loads<\/h2>\n<p>The tracker installs as one script tag. On most sites it points to an address like <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/edgecdnplus.com\/code?code=...<\/code> (the same script is served through the Hitsteps delivery network, for example from <code style=\"white-space:normal;overflow-wrap:anywhere\">log.hitsteps.com<\/code>). The tag creates the request for you, so you rarely see this address in your own code.<\/p>\n<p>The response has this shape:<\/p>\n<ul>\n<li>a site-specific settings block, which differs from site to site;<\/li>\n<li>the shared tracking engine file (<code style=\"white-space:normal;overflow-wrap:anywhere\">track-script-min.js<\/code>), as one contiguous run of bytes;<\/li>\n<li>a short trailing section after the engine.<\/li>\n<\/ul>\n<p>Sites that turn on single page app tracking (<code style=\"white-space:normal;overflow-wrap:anywhere\">spa=1<\/code>) receive one more file inside the same response: the small SPA add-on (<code style=\"white-space:normal;overflow-wrap:anywhere\">track-spa.js<\/code>), placed immediately after the main engine, with no bytes in between. Those two engine files are shared by every Hitsteps site and come from one version-controlled source. The settings block is your site&#8217;s own.<\/p>\n<h2>The fingerprint file<\/h2>\n<p>Hitsteps keeps a small, human-readable file at <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/www.hitsteps.com\/tracker-manifest.json<\/code>. For every release it lists the SHA-256 fingerprint and the byte size of the engine files: <code style=\"white-space:normal;overflow-wrap:anywhere\">track-script-min.js<\/code> for regular websites and <code style=\"white-space:normal;overflow-wrap:anywhere\">track-spa.js<\/code> for single page apps. The file is generated from the release itself, and older releases stay listed in its engine history.<\/p>\n<p>One detail matters later: the fingerprint stays identical when a release does not change the engine, so the same hash can appear in several consecutive releases.<\/p>\n<h2>Step 1: find the script your page fetched, and save it<\/h2>\n<ol>\n<li>Open your website in Chrome or Edge.<\/li>\n<li>Open the developer tools with F12 (on a Mac: Command+Option+I).<\/li>\n<li>Switch to the Network tab.<\/li>\n<li>Reload the page, then find the request named <code style=\"white-space:normal;overflow-wrap:anywhere\">code?code=...<\/code> coming from <code style=\"white-space:normal;overflow-wrap:anywhere\">edgecdnplus.com<\/code> or <code style=\"white-space:normal;overflow-wrap:anywhere\">log.hitsteps.com<\/code>.<\/li>\n<li>Right-click that request and choose <strong>Copy<\/strong>, then <strong>Copy response<\/strong>. Chrome and Edge copy the exact response body to your clipboard. This is the documented, supported way to get the bytes your browser received.<\/li>\n<li>Paste the clipboard into a plain text editor and save the file as <code style=\"white-space:normal;overflow-wrap:anywhere\">tracker-response.js<\/code> with UTF-8 encoding, no BOM, and with the editor set not to convert line endings. A single trailing newline added by the editor at the end is harmless, because the engine sits in the middle of the response; converting line endings or re-encoding the text inside the response would change the bytes and break the comparison (the check below will then correctly report a mismatch).<\/li>\n<\/ol>\n<p>Remember which folder you used, because the next step needs this exact file.<\/p>\n<p>The worked example at the end records the capture method, the response length, the engine offset and the result for this exact path. If you prefer a command line route instead, you can re-fetch the same URL and save its output straight to <code style=\"white-space:normal;overflow-wrap:anywhere\">tracker-response.js<\/code> (for example <code style=\"white-space:normal;overflow-wrap:anywhere\">curl -sS \"URL\" -o tracker-response.js<\/code>). That route downloads a fresh copy from the Hitsteps delivery network at that moment, through the same kind of caching that applied to the original request. Technically it is a fresh replay of the URL, not the captured response, so it checks the current serving path rather than the earlier response. Keep any such file labeled as a replay, and scope the result to the engine bytes it contains, as the worked example does.<\/p>\n<h2>Step 2: run the two checks<\/h2>\n<p>The method has two parts, and both are needed to draw the conclusion.<\/p>\n<h3>Check 1: the reference file matches the manifest<\/h3>\n<p>Download the engine file exactly as served: <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/www.hitsteps.com\/track-script-min.js<\/code>. Then compute its fingerprint:<\/p>\n<ul>\n<li>On macOS or Linux: <code style=\"white-space:normal;overflow-wrap:anywhere\">shasum -a 256 track-script-min.js<\/code><\/li>\n<li>On Windows PowerShell: <code style=\"white-space:normal;overflow-wrap:anywhere\">Get-FileHash .\\track-script-min.js -Algorithm SHA256<\/code><\/li>\n<li>Or use a reputable online SHA-256 tool that accepts an uploaded file.<\/li>\n<\/ul>\n<p>A SHA-256 fingerprint is always 64 hex characters. Compare it with the <code style=\"white-space:normal;overflow-wrap:anywhere\">sha256<\/code> value for <code style=\"white-space:normal;overflow-wrap:anywhere\">track-script-min.js<\/code> in the manifest, and compare the file size with the manifest&#8217;s <code style=\"white-space:normal;overflow-wrap:anywhere\">bytes<\/code> value for the same file. A match means this downloaded reference is the exact engine the manifest describes.<\/p>\n<h3>Check 2: the reference bytes are inside your saved response<\/h3>\n<p>The tracker response contains the engine as one contiguous block. The rigorous way to confirm it is to look for the exact reference bytes inside the saved response. Save the short script below in the same folder as your files (a normal Python 3 installation is all it needs, on any operating system) and run it:<\/p>\n<pre style=\"white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal\"><code class=\"language-python\" style=\"white-space:inherit;overflow-wrap:inherit;word-break:inherit\">#!\/usr\/bin\/env python3\n&quot;&quot;&quot;Verify a saved Hitsteps tracker response against the public manifest.\n\nUsage (exactly 4 or 7 arguments):\n  python3 verify-hitsteps.py RESPONSE.js REFERENCE.js REFERENCE_SHA256 REFERENCE_BYTES\n  python3 verify-hitsteps.py RESPONSE.js REFERENCE.js REFERENCE_SHA256 REFERENCE_BYTES SPA.js SPA_SHA256 SPA_BYTES\n\nWhat this checks:\n  1. The reference file(s) match the manifest (SHA-256 and byte size).\n  2. The main engine bytes appear as one contiguous block inside the saved\n     tracker response; when you request the SPA check, the SPA add-on appears\n     immediately after the main engine (adjacent, with no bytes in between).\n  It prints the byte offset of the engine and, for every reference file it\n  finds inside the saved response, the SHA-256 of those exact engine bytes.\n  The slice hash is printed only when the supplied reference file was found\n  inside the response. If a reference is not present (for example you check a\n  response that contains an older listed engine while supplying today's file),\n  the script prints no slice hash and reports a failed check. A historical\n  match therefore needs the older reference verified against that history\n  entry (hash and byte size), or an engine slice you isolate from the response\n  and hash yourself.\n\nRESPONSE.js  the tracker response from Step 1 (saved with Copy &gt; Copy response,\n             or an HTTP replay written straight to a file)\nREFERENCE.js track-script-min.js from https:\/\/www.hitsteps.com\/track-script-min.js\nSPA.js       track-spa.js from https:\/\/www.hitsteps.com\/track-spa.js (single page apps only)\nREFERENCE_SHA256 and REFERENCE_BYTES are the values listed for the file under\n&quot;files&quot; in https:\/\/www.hitsteps.com\/tracker-manifest.json.\n&quot;&quot;&quot;\nimport hashlib, sys\n\ndef digest(data):\n    return hashlib.sha256(data).hexdigest()\n\ndef check(name, path, expected_sha, expected_bytes, resp, must_follow=None):\n    data = open(path, &quot;rb&quot;).read()\n    sha = digest(data)\n    meta_ok = (sha == expected_sha) and (len(data) == expected_bytes)\n    print(f&quot;[{name}] file   {path}&quot;)\n    print(f&quot;  sha256 {sha}  expected {expected_sha}&quot;)\n    print(f&quot;  size   {len(data)} B  expected {expected_bytes} B  -&gt; {'OK' if meta_ok else 'FAIL'}&quot;)\n    pos = resp.find(data)\n    if pos &gt;= 0:\n        after = len(resp) - pos - len(data)\n        adjacent = (pos == must_follow) if must_follow is not None else True\n        line = f&quot;  inside response at byte offset {pos}; {after} bytes after it&quot;\n        if must_follow is not None:\n            line += &quot;  (immediately after the main engine? &quot; + (&quot;YES -&gt; OK&quot; if adjacent else &quot;NO -&gt; FAIL&quot;) + &quot;)&quot;\n        print(line)\n        print(f&quot;  sha256 of those bytes: {digest(resp[pos:pos + len(data)])}&quot;)\n    else:\n        adjacent = False\n        print(&quot;  inside response: engine bytes NOT found as a contiguous block -&gt; FAIL&quot;)\n    return meta_ok and pos &gt;= 0 and adjacent\n\ndef main():\n    args = sys.argv[1:]\n    if len(args) not in (4, 7):\n        sys.stderr.write(__doc__)\n        sys.exit(2)\n    resp = open(args[0], &quot;rb&quot;).read()\n    print(f&quot;response {args[0]}  {len(resp)} bytes&quot;)\n    main_data = open(args[1], &quot;rb&quot;).read()\n    results = [check(&quot;main engine&quot;, args[1], args[2], int(args[3]), resp)]\n    main_end = resp.find(main_data)\n    if len(args) == 7:\n        if main_end &gt;= 0:\n            main_end += len(main_data)\n        results.append(check(&quot;spa add-on&quot;, args[4], args[5], int(args[6]), resp, must_follow=main_end))\n    verdict = &quot;MATCH&quot; if all(results) else &quot;MISMATCH&quot;\n    print(&quot;RESULT: &quot; + verdict)\n    sys.exit(0 if all(results) else 1)\n\nif __name__ == &quot;__main__&quot;:\n    main()\n<\/code><\/pre>\n<p>The script takes exactly 4 or exactly 7 arguments, nothing in between: the four-argument form checks the main engine only, and the seven-argument form adds the SPA check. If you pass any other number of arguments it prints the usage and stops, instead of guessing. The main engine check is the main check, for regular websites and for single page app installs alike; the SPA add-on is an additional check you add when you know the site uses SPA tracking.<\/p>\n<p>Replace <code style=\"white-space:normal;overflow-wrap:anywhere\">REFERENCE_SHA256<\/code> and <code style=\"white-space:normal;overflow-wrap:anywhere\">REFERENCE_BYTES<\/code> with the values from the manifest for your file (and <code style=\"white-space:normal;overflow-wrap:anywhere\">SPA_SHA256<\/code>, <code style=\"white-space:normal;overflow-wrap:anywhere\">SPA_BYTES<\/code> with the <code style=\"white-space:normal;overflow-wrap:anywhere\">track-spa.js<\/code> values when you use the seven-argument form). The script prints what it found: whether each reference matched the manifest, the byte offset where the engine sits inside your response, how many bytes come after it, and the SHA-256 of the engine bytes exactly as found in the response. <code style=\"white-space:normal;overflow-wrap:anywhere\">RESULT: MATCH<\/code> means the response you saved embeds exactly the engine or engines the manifest describes. <code style=\"white-space:normal;overflow-wrap:anywhere\">RESULT: MISMATCH<\/code> means one of the checks failed, and the lines above it show which one.<\/p>\n<p>Your folder then contains <code style=\"white-space:normal;overflow-wrap:anywhere\">tracker-response.js<\/code> (from Step 1), <code style=\"white-space:normal;overflow-wrap:anywhere\">track-script-min.js<\/code> (and <code style=\"white-space:normal;overflow-wrap:anywhere\">track-spa.js<\/code> for SPA sites), and <code style=\"white-space:normal;overflow-wrap:anywhere\">verify-hitsteps.py<\/code>. Run e.g.:<\/p>\n<ul>\n<li>Regular: <code style=\"white-space:normal;overflow-wrap:anywhere\">python3 verify-hitsteps.py tracker-response.js track-script-min.js 6d37f6d46833ef01e8e4185a1d862d45350f9c041c98df161a99af2a18956c04 110287<\/code><\/li>\n<li>SPA, after substituting your own <code style=\"white-space:normal;overflow-wrap:anywhere\">track-spa.js<\/code> hash and size:<br \/>\n  <code style=\"white-space:normal;overflow-wrap:anywhere\">python3 verify-hitsteps.py tracker-response.js track-script-min.js &lt;HASH&gt; &lt;BYTES&gt; track-spa.js &lt;SPA_HASH&gt; &lt;SPA_BYTES&gt;<\/code><\/li>\n<\/ul>\n<h3>What the two checks together verify<\/h3>\n<p>Check 1 verifies that the reference engine you downloaded is exactly the engine Hitsteps published for the release described in the manifest. Check 2 verifies that those same bytes sit, as one contiguous block, inside the response your page fetched. A MATCH therefore means the response bytes your browser received embed, byte for byte, the engine Hitsteps published.<\/p>\n<p>The scope is deliberate. The check covers the shared main engine, and the SPA add-on when you add it. It does not cover your site&#8217;s own settings block at the start of the response or the short trailing section, and it is not a review of what the script does while it runs. It is an identity check on the engine: the same bytes, or not.<\/p>\n<h3>A worked example<\/h3>\n<p>On 28 November 2026 at 21:32-21:47 UTC we ran the full walkthrough against the live manifest and the tracker response of our own site: <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/edgecdnplus.com\/code?code=90231ecc107f37f12d799261dc088461&amp;lang=en<\/code>, the request the English security page loads.<\/p>\n<ul>\n<li>Manifest: <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/www.hitsteps.com\/tracker-manifest.json<\/code> (release commit <code style=\"white-space:normal;overflow-wrap:anywhere\">367446f1433f...<\/code>, <code style=\"white-space:normal;overflow-wrap:anywhere\">committed_at 2026-11-28T21:28:00Z<\/code>) listed <code style=\"white-space:normal;overflow-wrap:anywhere\">track-script-min.js<\/code> as SHA-256 <code style=\"white-space:normal;overflow-wrap:anywhere\">6d37f6d46833ef01e8e4185a1d862d45350f9c041c98df161a99af2a18956c04<\/code>, 110,287 bytes, and <code style=\"white-space:normal;overflow-wrap:anywhere\">track-spa.js<\/code> as <code style=\"white-space:normal;overflow-wrap:anywhere\">188a7c304ca2717239f9aa4cb9d30dd936798a23836019e16ba08eee01fc8161<\/code>, 6,787 bytes.<\/li>\n<li>Check 1: <code style=\"white-space:normal;overflow-wrap:anywhere\">track-script-min.js<\/code> downloaded from <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/www.hitsteps.com\/track-script-min.js<\/code> measured exactly 110,287 bytes and returned the SHA-256 above. Match with the manifest.<\/li>\n<\/ul>\n<p>We then ran Check 2 on the saved response from the documented browser path and on a fresh replay, labeling each.<\/p>\n<ul>\n<li><strong>Browser capture (Network, Copy, Copy response, saved to <code style=\"white-space:normal;overflow-wrap:anywhere\">tracker-response.js<\/code>):<\/strong> the captured body was 116,765 bytes. The script found the exact engine bytes as a contiguous block starting at byte offset 5,634, with 844 bytes after the engine, and printed the engine slice SHA-256 as the manifest value. RESULT: MATCH.<\/li>\n<li><strong>Fresh HTTP replay (curl of the same URL):<\/strong> the saved body was 116,756 bytes. The engine sat at byte offset 5,625, again with 844 bytes after it. RESULT: MATCH.<\/li>\n<\/ul>\n<p>The two bodies differ by a few wrapper bytes, and the engine offsets differ accordingly. Both contained the identical engine bytes, and both passed. What a match covers is the engine bytes inside the response, not the surrounding wrapper, so the scope stays the same whichever route produced the file.<\/p>\n<p>We repeated the walkthrough on the <code style=\"white-space:normal;overflow-wrap:anywhere\">spa=1<\/code> variant of the same URL (123,543 bytes, fresh HTTP replay). The main engine sat at offset 5,625 again, the 6,787-byte SPA add-on began immediately after it at offset 115,912, and 844 bytes followed. Both files matched the manifest. RESULT: MATCH.<\/p>\n<p>This manifest (commit <code style=\"white-space:normal;overflow-wrap:anywhere\">367446f1433f<\/code>, 21:28:00Z) lists exactly the same engine hashes as the earlier build (commit <code style=\"white-space:normal;overflow-wrap:anywhere\">e62e3acb0945<\/code>, 19:50:37Z) that we exercised at 20:48-20:52 UTC, which is the article&#8217;s point that a fingerprint can stay identical when a release does not change the engine.<\/p>\n<p>As a control, we flipped a single byte inside the engine bytes of a copy of the saved response and reran the script. Check 2 failed with <code style=\"white-space:normal;overflow-wrap:anywhere\">RESULT: MISMATCH<\/code>. In a second control we inserted unrelated bytes between the main engine and the SPA add-on; the script reported the add-on as not immediately adjacent and returned <code style=\"white-space:normal;overflow-wrap:anywhere\">RESULT: MISMATCH<\/code>. In a third control we called the seven-argument form on a response that contained no SPA add-on at all; instead of a silent main-only pass, the script reported the add-on missing and returned <code style=\"white-space:normal;overflow-wrap:anywhere\">RESULT: MISMATCH<\/code>. These controls show the method and the script distinguish a changed, a non-adjacent and an unfinished response from a verified one.<\/p>\n<p>The offset itself is not fixed: it moves with your site&#8217;s settings block and the request parameters. The claim being verified is the contiguous block, not a particular number.<\/p>\n<h2>Step 3: read the result precisely<\/h2>\n<p>A fingerprint match tells you more than &#8220;yes or no&#8221;, so it deserves an honest reading. In every case below, &#8220;match&#8221; refers to the reference bytes the script found inside the response you saved, and to the SHA-256 it prints for those found bytes.<\/p>\n<p><strong>Your hash matches the current manifest entry.<\/strong> The response embeds the engine the current release publishes.<\/p>\n<p><strong>Your hash matches an older entry in the engine history.<\/strong> The manifest&#8217;s engine history lists each older release&#8217;s engine values (the same SHA-256 and byte size per file), but it does not publish the old engine files themselves. The script can print a hash only for a supplied reference it actually finds in the response. With today&#8217;s file alone, a failed check leaves the older identity unknown: the current bytes simply are not there, and the script prints no slice hash, so nothing is compared yet. To verify an older engine you need either the corresponding archived engine file, itself checked against that history row&#8217;s hash and byte size (the checker then finds the block and confirms it), or the engine slice isolated from your response and hashed separately so its own hash and size can be compared with the history rows. A match against a history entry then identifies an older listed engine. The same hash can appear in several rows because a release that does not change the engine keeps the same fingerprint.<\/p>\n<p><strong>Nothing in the manifest matches.<\/strong> The response is unverified against what Hitsteps lists today, current or historical. A failed current containment check does not by itself exhaust the history: it tells you today&#8217;s reference was not found; checking older entries requires the archived reference or an isolated slice as above. Before reading anything into the result, rule out serving and caching. The Network tab&#8217;s Disable cache option and an incognito or private window address the browser&#8217;s own copy of the script. A content delivery network, a plugin cache or a proxy can still hand out an older copy, and a cleared browser does not by itself guarantee a fresh fetch or let a retry bypass an upstream cache. If a genuinely fresh check still matches nothing, email <code style=\"white-space:normal;overflow-wrap:anywhere\">security@hitsteps.com<\/code>, explain what you ran, and include the response URL, the saved file and the hashes you got.<\/p>\n<p>How we control changes to the tracking engine, and what the fingerprint is for, is described on our security page: <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/www.hitsteps.com\/security<\/code>.<\/p>\n<h2>Try it with your own site<\/h2>\n<p>If your site does not use Hitsteps yet, create a free account, paste the one line of code into your site, and the same tracker you just verified will start reporting your first visits into your own dashboard. When the numbers arrive, you can run this check again any time, and the current fingerprint is always waiting in the manifest.<\/p>\n<p>Start your free trial at <code style=\"white-space:normal;overflow-wrap:anywhere\">https:\/\/www.hitsteps.com\/register.php<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to verify the tracking script on your website: compare the bytes your page actually fetched with the engine Hitsteps publicly fingerprints.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-4222","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/posts\/4222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/comments?post=4222"}],"version-history":[{"count":3,"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/posts\/4222\/revisions"}],"predecessor-version":[{"id":4231,"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/posts\/4222\/revisions\/4231"}],"wp:attachment":[{"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/media?parent=4222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/categories?post=4222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hitsteps.com\/blog\/wp-json\/wp\/v2\/tags?post=4222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}