Verify Installation

Documents / Installation

Verifying means proving Smart Code actually runs on a real URL — not only that you copied a snippet. CROForge can open the page with a special query flag and wait for the snippet to send a short message back. If that handshake succeeds, the install is good enough for experiments to load.

Use this after every new site, after a tag-manager change, and after a CSP or consent-banner change that might block scripts.

Words used on this page

WordEveryday meaningMeaning in CROForge
VerifyCheck that something is really thereThe Code-tab checker labeled “Check if SmartCode is installed properly on your URL”
Smart CodeA small program snippet on the siteMust load init.js for your workspace before verification can succeed
SnippetA short piece of code to pasteThe HTML or WordPress block from Websites and Apps → Code tab
init.jsThe file that starts experimentsConfirm it appears in page source and returns HTTP 200 in Network
__smartcode_checkA flag added to the URLQuery parameter the checker appends, for example ?__smartcode_check=sc_…
postMessageA browser note from one window to anotherThe opened page sends type: "SMARTCODE_CHECK" with a matching checkerId
SMARTCODE_CHECKThe name of that verification messageThe message type the app listens for; origin must match the URL you entered
DomainThe website address hostMust be allowlisted; a wrong host looks like “invalid domain”
AllowlistAn approved list of hostsSmart Code refuses to run if location.hostname is not on the list
CSPA site policy that allows or blocks scriptsA common reason verify fails if app.croforge.com is not permitted
AdblockA browser extension that blocks trackersCan hide or block init.js so the checker never hears back
DebugA way to inspect failuresA Debug tab/FAQ exists but may be commented out; prefer this Code-tab verify flow
Live PreviewA forced look at one variationOptional manual check after a Running campaign exists
ControlThe original experience in a testIf Control is assigned, you may see no visual change even when Smart Code works
FlickerA brief flash of the original pageNot a verify failure by itself; it means the snippet ran late or CSS applied after paint

Screenshot

Use this screenshot filename when you add a capture: verify-installation.png in docs/assets/placeholders/. Do not embed an image in this file.


In-app verification (recommended)

  1. Open Configurations → Websites and Apps → your site → Code / Smart Code tab.
  2. Find Check if SmartCode is installed properly on your URL.
  3. Enter a full URL on your domain. It must start with https:// or http://.
  4. Run verify. The app opens the URL with __smartcode_check (a unique checkerId) and listens for a SMARTCODE_CHECK postMessage when Smart Code loads.

The in-product copy says the new tab closes automatically once the check is complete. In-product FAQs on the website-app page also cover this flow.

What must be true for success:

  • The opened page is on the same origin you typed (the listener ignores other origins).
  • Smart Code loads and sends type: "SMARTCODE_CHECK" with the same checkerId.
  • Nothing (CSP, adblock, consent wall, wrong snippet) blocked init.js before that message.

Manual checklist

Use this if the in-app checker fails or you want a second opinion.

  1. View page source and confirm the init.js script for your workspace id, with id cro-forge-experiments-js.
  2. Open DevTools → Network → init.js → status 200.
  3. Create a simple Running campaign with broad URL targeting and visible CSS (for example a background color) so a winning Variant is obvious.
  4. Soft-refresh the page — the variation should apply when you are not assigned Control.
  5. Optional: use Live Preview from the campaign variations menu so you force a specific variation. See Preview mode.

Common failures

SymptomLikely cause
Script 404Wrong host, workspace id, or path. Confirm https://app.croforge.com/{workspaceId}/init.js?ver=1.0.0.
Invalid domainHostname is not allowlisted for this Smart Code build. Register the exact host under Websites and Apps.
No visual changeCampaign is not Running; URL or segment mismatch; Control was assigned; CSS is too subtle.
Verify failsScript not in <head>, blocked by CSP or adblock, consent banner delaying scripts, or you verified a URL on the wrong domain.

Deeper runtime behavior is in Smart Code runtime. Cookie consent and Debug UI may be hidden or commented out in the current build — do not wait on those screens to verify.

Related reading