Start HereIntegrationsHelp
DocsStart Here

Track page views, leads and sales on your website.

Overview

The Open Tracked Pixel is a small script for your website. It records page views, carts, leads and purchases, and ties each sale to the ad or channel it came from.

Using a platform? Pick it in the sidebar.

Install the pixel

  1. Get your site key

    In the dashboard, open Settings → Pixel & install. Your snippet is there with your key in it. The key starts with os_.

  2. Install the snippet

    Paste it inside the <head> of every page.

    Pixel snippet
    <script async src="https://app.opentracked.io/os.js?k=YOUR_SITE_KEY" data-key="YOUR_SITE_KEY" data-window="30"></script>

    data-window is the attribution window in days, from 1 to 90.

  3. Check it works

    Open your site. The status in Pixel & install turns green. Need help? See Test and troubleshoot.

Track events

Page views are automatic. For anything else, call opentracked when it happens.

Track an event
opentracked('track', 'add_to_cart', {
  product_id: 'SKU-1',
  product_name: 'Product name',
  value: 49.00,
  currency: 'USD'
});

Standard events

EventWhen to fire it
page_viewA page loads (automatic)
view_itemA visitor views a product
view_item_listA visitor views a product list
add_to_cartAn item is added to the cart
remove_from_cartAn item is removed from the cart
begin_checkoutCheckout starts
checkout_contactEmail or phone entered at checkout
add_payment_infoThe payment step is reached
purchaseAn order is paid. Needs an order_id
searchA visitor searches. Send search_term
generate_leadA lead form is submitted
ScheduleA meeting or appointment is booked
sign_upA visitor creates an account
subscribeA visitor subscribes
customAnything else

Custom events

Use custom and describe it in properties.

Custom event
opentracked('track', 'custom', {
  properties: { name: 'clicked_pricing' }
});

Track purchases

If you use your own checkout, send a purchase when an order is paid.

Track a purchase
opentracked('track', 'purchase', {
  order_id: '1001',
  value: 98.00,
  currency: 'USD',
  items: [{ id: 'SKU-1', name: 'Product name', qty: 2, price: 49.00, image: 'https://example.com/photo.jpg' }]
});
  • order_id is required and must be unique.
  • Fire it once, on the thank-you page.
  • The same order_id never counts twice.
  • image (an https link) and sku on an item are optional. With them the order and product pages show the product picture without a catalogue.

Attach customer details

Add email, name or phone to the purchase, or call identify once and they are added to every event after it.

Identify a visitor
opentracked('identify', {
  email: '[email protected]',
  name: 'Jane Doe',
  phone: '+15551234567'
});
Send plain text

Do not hash emails or phone numbers, and never send card numbers or passwords.

© Open TrackedSupportTermsPrivacy