lr_px_ followed by 22 characters), from your Lemrock contact.
1. Add the pixel
- In Shopify, go to Settings > Customer events > Add custom pixel. Name it
Lemrock. If aLemrockpixel is already there, follow Already using the previous version? instead. - Under Customer privacy, set Permission to Required and tick Marketing. The pixel then only runs for visitors who accept marketing cookies.
- Paste the code below in Code, and fill in its settings as described under it.
- Click Save, then Connect.
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:- In Shopify, go to Settings > Customer events and open Lemrock.
- In Code, delete everything and paste the code above.
- Put your pixel ID in
pixelId: the one fromPIXEL_IDin the previous version. If you had changedvariant?.product?.idtovariant?.idorvariant?.sku, setproductIdto"variant"or"sku". - Click Save.
2. Check your setup
Run this test in a private browsing window.- Turn on debug mode. Remove the
//in front ofdebug: trueand save. Pixel messages start with[Lemrock Pixel]in the browser console. - Simulate an ad click. Open your store with
?lrclid=lr_clk_0000000000000000000000added to the URL, and accept the cookie banner. - Walk the funnel. View a product, add it to the cart, and place a test order.
- Open your browser’s developer tools, tab Console. Each event shows one line ending in
sent → 202, such as[Lemrock Pixel] contents_viewed … sent → 202for a product view. Viewing a product and adding it to the cart send one event each; placing the order sends two,checkout_startedandorder_created. In the Network tab, filtered onbrowser/events, each event shows one request with status202. - Turn debug mode off. Put the
//back in front ofdebug: trueand save.
- Read the console. Setup mistakes and refused events always print a
[Lemrock Pixel]message, even without debug mode.Invalid LEMROCK settingsnames the setting to fix: the pixel sends no event until it is fixed. A400names 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
lrclidin the URL.

