Skip to Content
Install WhenceInstall on Magento and Adobe Commerce

Install on Magento and Adobe Commerce

On Magento 2 and Adobe Commerce, the Whence block goes in the HTML head of your store view, from the admin. It takes about 4 minutes.

Step 1: Copy the block

In Whence, open Setup > Install and pick the Magento tab (1). Click Copy (2) on Paste this block. It carries your site key and the address Whence listens on.

Step 2: Open the design configuration

In the Adobe Commerce or Magento admin, open Content, then Design, then Configuration. Click Edit on your store view. Under Other Settings, expand HTML Head.

Step 3: Paste the block and save

Paste the block at the end of Scripts and Style Sheets, then click Save Configuration.

Screenshot coming soonMagento admin, Design Configuration, HTML Head section with the Whence block at the end of Scripts and Style Sheets

Step 4: Flush the cache

Open System, then Cache Management, and flush the page cache so the block reaches every page.

What Whence receives

  • Visits and replays on every page of the store view.
  • On Magento 2.4, these scripts only run on checkout if your Content Security Policy allows them.
  • Whence has no order connection for Magento: it does not read your orders.

To send conversions to your ad platforms, turn on the browser pixel in Marketing > Conversions and add the tag it gives you before </body>. Your pages then call window.whencePixels.track(…) at each step (product view, add to cart, checkout, payment, order). Purchases go out through the browser only; the other steps also go out from the server.

Whence reads Google Consent Mode, Cookiebot and OneTrust. With another banner, run whence.consent({ analytics: true, marketing: true }) when the visitor answers. See Which cookie banner to use.

Last updated on