Skip to main content
On Shopify, the Lemrock Pixel installs as a custom pixel: a few lines pasted in your Shopify admin, with no theme changes. It sends the order and the three recommended events automatically: nothing else to set up. You need your pixel ID (lr_px_ followed by 22 characters), from your Lemrock contact.

1. Add the pixel

  1. In Shopify, go to Settings > Customer events > Add custom pixel. Name it Lemrock. If a Lemrock pixel is already there, follow Already using the previous version? instead.
  2. Under Customer privacy, set Permission to Required and tick Marketing. The pixel then only runs for visitors who accept marketing cookies.
  3. Paste the code below in Code, and fill in its settings as described under it.
  4. Click Save, then Connect.
You only ever edit the LEMROCK settings at the top. To change an optional setting, uncomment it first: remove the // at the start of its line. The pixel hashes the customer’s email in the browser before sending it, so Lemrock never receives the address itself. Nothing to set up.

Already using the previous version?

If your store runs the previous version of the pixel, replace it with the code above. This code loads Lemrock’s latest pixel, so your store gets updates without you pasting code again. Replace the code in your existing pixel rather than adding a second one:
  1. In Shopify, go to Settings > Customer events and open Lemrock.
  2. In Code, delete everything and paste the code above.
  3. Put your pixel ID in pixelId: the one from PIXEL_ID in the previous version. If you had changed variant?.product?.id to variant?.id or variant?.sku, set productId to "variant" or "sku".
  4. Click Save.
Leave the pixel’s name, its Customer privacy settings and its connection as they are.

2. Check your setup

Run this test in a private browsing window.
  1. Turn on debug mode. Remove the // in front of debug: true and save. Pixel messages start with [Lemrock Pixel] in the browser console.
  2. Simulate an ad click. Open your store with ?lrclid=lr_clk_0000000000000000000000 added to the URL, and accept the cookie banner.
  3. Walk the funnel. View a product, add it to the cart, and place a test order.
  4. Open your browser’s developer tools, tab Console. Each event shows one line ending in sent → 202, such as [Lemrock Pixel] contents_viewed … sent → 202 for a product view. Viewing a product and adding it to the cart send one event each; placing the order sends two, checkout_started and order_created. In the Network tab, filtered on browser/events, each event shows one request with status 202.
  5. Turn debug mode off. Put the // back in front of debug: true and save.
The test click matches no real Lemrock ad, so these events don’t count as conversions. If something is wrong:
  • Read the console. Setup mistakes and refused events always print a [Lemrock Pixel] message, even without debug mode. Invalid LEMROCK settings names the setting to fix: the pixel sends no event until it is fixed. A 400 names the field Lemrock refused.
  • No request: check the pixel is connected and the cookie banner was accepted. Shopify Pixel Helper shows whether the pixel runs.
  • A change doesn’t show up at checkout: a checkout keeps the pixel code it started with. Start a new checkout after saving.
  • Make sure your redirects keep lrclid in the URL.
Your Lemrock contact can confirm events are arriving. Send them your pixel ID and the time of your test.