Skip to main content
Install the Lemrock Pixel in your site’s code. You need your pixel ID, from your Lemrock contact. To check the install, see Check your setup.

1. Load the pixel

Paste this into the <head> of your page template, so it runs on every page. Replace lr_px_... with your pixel ID.
The script loads in the background and doesn’t slow your page.

2. Report events

Call measure when the event happens, for example on your order confirmation page. The snippet from step 1 must be on that page too.
The other three events are the same call with a different event name. Amounts are always in cents here: 2599 for €25.99. Add a hashed user to init. See Hash email and phone.
If you only learn who the visitor is later, for example after login, call init again with just the user. Only send it for visitors whose consent covers sharing their email or phone with Lemrock for ad measurement.
  • User data lasts one page. Send it on every page where you know the visitor and report an event, before the measure call.
  • A new user replaces the previous one. Send both identifiers together if you have both.
The pixel assumes consent until told otherwise. If your site asks visitors for consent, pass the answer:
  • Pass true or false, not a string. Anything other than true counts as a refusal, including "true".
  • The refusal is remembered, so you don’t need to repeat the call on every page.
  • If your consent banner blocks scripts until the visitor answers, block the Lemrock snippet too.