Developer documentation

KePixel Custom Web Tracking

Install the exact KePixel Web GTM snippet from Source Setup, keep your existing website code in control of real business outcomes, and add structured dataLayer events only where automatic evidence is not reliable enough.

1 · Open Custom Website → Setup
2 · Install the provisioned Web GTM snippet
3 · Keep / add structured dataLayer events
4 · Verify real events in KePixel

Implementation flow

Open the exact Custom Website source

Go to KePixel → Sources → your Custom Website → Setup. Do not reuse another site's GTM container or copy IDs from a different source.

Wait until the managed Web container is ready

If Setup still shows Preparing, use Overview → Refresh source status. The browser should not invent or manually select KePixel runtime IDs.

Copy the exact Web GTM installation code

Use the two snippets shown by KePixel for this source: the <head> script and the <noscript> fallback immediately after the opening <body>.

Keep your existing dataLayer when it already describes real outcomes

KePixel reads approved canonical or alias event names. You only add a new push when the site does not expose a reliable business signal automatically.

Implement missing high-value events with structured values

Use stable item IDs, real transaction IDs, accurate values/currency, and explicit success signals. Do not create conversions from button text alone.

Test before release

Trigger real test actions, confirm the event name and essential parameters, then return to KePixel and refresh the source state. Production conversion events should reflect actual successful business outcomes.

Developer boundary

The Custom Web developer installs the provisioned Web GTM snippet and supplies reliable website semantics. You do not need KePixel GTM edit access, a Server GTM container ID, a Server Tagging URL, destination credentials, access tokens, or a custom KePixel relay endpoint.

What appears in KePixel Setup

Required

Web GTM installation

KePixel shows the exact source-specific Web GTM container installation code. Paste it on the website once.

Managed

Server connection

KePixel provisions and configures the downstream Server GTM connection internally. It is not a customer input for Custom Web.

KePixel → Sources → your Custom Website → Setup

Do not install a generic KePixel script instead

The customer install surface for Custom Web V1 is the provisioned Web GTM snippet. The managed Web container loads KePixel Web Intelligence and carries the source/site configuration for you.

Install the Web GTM container

Copy the installation snippets exactly as KePixel displays them. A standard Web GTM installation has a script in the document head and a noscript iframe immediately after the opening body tag. Do not change the container ID or data layer name unless KePixel Setup explicitly tells you to.

Head

Paste the exact KePixel-provisioned GTM script as high in <head> as your site architecture safely allows.

Body

Paste the matching <noscript> block immediately after the opening <body>.

If the site already has a dataLayer

Keep it. KePixel is designed to read recognized structured pushes instead of asking you to duplicate the same business events in a second custom object.

What KePixel can recognize automatically

Automatic detection is conservative. It only emits a verified business event when the browser has enough evidence.

EventAutomatic pathQuality rule
page_viewRuntime initialization + history changesKePixel owns the page-view signal to avoid duplicate explicit page views.
view_itemJSON-LD / Schema.org Product or explicit dataLayerRequires structured product identity.
add_to_cartConfirmed cart-count increase with product context, or explicit dataLayerClick text alone is not enough.
form_submitNative GTM form submit or explicit dataLayerField values are not copied.
contactVerified WhatsApp, tel: or mailto: link, or explicit dataLayerRepresents contact intent, not a sale.
request_eventVerified Calendly link or explicit dataLayerRepresents request/meeting intent, not a confirmed booking.

Automatic does not mean speculative

KePixel does not create purchase, checkout or cart conversions from generic button labels, CSS selectors, page text, or raw click streams. When the site does not expose enough evidence, add the smallest explicit structured event instead.

Structured dataLayer contract

Use the normal event key and GA4-compatible ecommerce shapes. KePixel accepts canonical names and a bounded set of common aliases, but canonical names are preferred in new implementations.

Generic pattern

window.dataLayer = window.dataLayer || []; dataLayer.push({ event: 'EVENT_NAME', event_params: { // non-PII business context only } });

Supported Custom Web V1 events

page_view, view_item_list, select_item, view_item, view_cart, add_to_cart, remove_from_cart, begin_checkout, add_payment_info, purchase, search, generate_lead, form_start, form_submit, login, sign_up, contact, request_event.

Ecommerce event quality

Minimum conversion path

view_item → add_to_cart → begin_checkout → purchase

Keep the same stable item_id across the funnel. When value is sent, send the matching three-letter currency.

view_item

dataLayer.push({ event: 'view_item', ecommerce: { currency: 'USD', value: 29.99, items: [{ item_id: 'SKU_1', item_name: 'Example product', price: 29.99, quantity: 1 }] } });

add_to_cart

dataLayer.push({ event: 'add_to_cart', ecommerce: { currency: 'USD', value: 29.99, items: [{ item_id: 'SKU_1', item_name: 'Example product', price: 29.99, quantity: 1 }] } });

begin_checkout

dataLayer.push({ event: 'begin_checkout', ecommerce: { currency: 'USD', value: 59.98, items: [{ item_id: 'SKU_1', item_name: 'Example product', price: 29.99, quantity: 2 }] } });

purchase

Fire only after the order is confirmed. A verified Custom Web purchase requires a real transaction ID, numeric non-negative value and three-letter currency. Include item data for downstream quality and product matching.

dataLayer.push({ event: 'purchase', ecommerce: { transaction_id: 'T_12345', currency: 'USD', value: 59.98, items: [{ item_id: 'SKU_1', item_name: 'Example product', price: 29.99, quantity: 2 }] } });

Reuse the same business transaction ID if the same confirmation is retried. Do not generate a new ID on every page reload.

Lead, search and account events

generate_lead

Fire only after the lead action succeeds. Do not put email, phone or form field values in the event payload.

dataLayer.push({ event: 'generate_lead', event_params: { lead_type: 'demo_request' } });

search

Use an explicit successful search signal when URL or page inference is not reliable.

dataLayer.push({ event: 'search', event_params: { search_term: 'running shoes' } });

login

Fire after successful authentication, not when the login button is clicked.

dataLayer.push({ event: 'login', event_params: { method: 'password' } });

sign_up

Fire after account creation succeeds.

dataLayer.push({ event: 'sign_up', event_params: { method: 'email' } });

Attribution and consent

Attribution

Keep real campaign parameters and click IDs in the landing URL. KePixel's browser runtime keeps sanitized session first-touch and latest-touch context from an allowlist. Do not fabricate ad-platform click IDs.

Consent

Your website remains responsible for its consent experience. KePixel carries consent with canonical events and defaults optional identifiers to denied when consent is unknown.

Privacy and identity boundary

Do not push personal form values into the Custom Web master

Do not add raw or hashed email, phone, full name, postal address, payment credentials, passwords or access tokens to ordinary KePixel dataLayer event pushes. The reusable master deliberately strips arbitrary user_data from the normal Custom Web event path.

Browser identifiers

Do not invent _fbp, _fbc or proprietary click IDs. Existing legitimate browser/attribution context may be collected by the managed runtime under consent and policy controls.

Testing checklist

  1. Confirm the exact KePixel Web GTM container is installed once.
  2. Use Tag Assistant / browser developer tools to confirm the GTM container loads.
  3. Trigger one real business action, not just a button click.
  4. Check the canonical event name and essential parameters.
  5. For commerce, verify stable item IDs, accurate value/currency and transaction ID where required.
  6. Return to KePixel → Source Overview and refresh the source status.
  7. Release the website change only after the test path matches the real business outcome.

Unknown site-specific events

KePixel does not forward unknown raw dataLayer activity as conversions. If a business event is missing, add the smallest explicit structured push for that event instead of sending DOM text or full form payloads.