Ad Pixel Event Code Generator — Meta, TikTok, LinkedIn and Pinterest

Pick a platform — Meta Pixel, Meta Conversions API, TikTok Pixel, LinkedIn Insight Tag or Pinterest Tag — choose a standard event like Lead, Purchase or CompletePayment, fill in the value, currency and items, and copy code that fires right away or on a click or form submit. Add an event ID to deduplicate browser and server events.

Runs in your browserUpdated

Items

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the Ad Pixel Event Code Generator

  1. Choose the platform: Meta Pixel, Meta Conversions API (server), TikTok, LinkedIn or Pinterest.
  2. Pick a standard event — or a custom one — and fill in value, currency and other parameters; shopping events get an Items list.
  3. Add an event ID if you also send the event from your server, so the platform counts it once.
  4. Choose when it fires — right away, on a click or on a form submit — and copy the code. For the Conversions API, copy the server request and keep the token secret.

Standard events per platform

  • Meta Pixel — fbq('track', 'Lead'), Purchase, AddToCart, CompleteRegistration and the other standard events Meta optimizes ads for, with value, currency, content_ids and contents; anything else is trackCustom. The event ID goes in the fourth argument as eventID.
  • Meta Conversions API — the same event sent from your server to the Graph API, with user_data hashed with SHA-256 (email lowercased, phone digits only), the visitor’s IP, user agent and _fbp/_fbc cookies. The email you type here is hashed in your browser to show the format.
  • TikTok Pixel — ttq.track('CompletePayment'), SubmitForm, AddToCart… with contents, value and currency; the event ID is the third argument.
  • LinkedIn Insight Tag — lintrk('track', { conversion_id }) for a conversion you created in Campaign Manager.
  • Pinterest Tag — pintrk('track', 'checkout'), lead, signup, addtocart… with line_items and event_id in the data.

All of them need the platform’s base code on the page first, and — in the EU and UK — the visitor’s consent; load them through the Cookie Consent Banner Generator. Track the same action in Google Analytics with the GA4 Event Code Generator, or tag every button at once with the Event Tracking Script.

Also searched as: pixel event code generator, meta pixel event code, facebook pixel event generator, meta conversions api example, tiktok pixel event code, linkedin conversion tracking code, pinterest tag event code, fbq track purchase.

Tools that pair well with the Ad Pixel Event Code Generator

  • Consent Mode Checker — Check a site’s cookie consent the way a regulator or an ad platform would.
  • UTM Builder — Add utm_source, utm_medium, utm_campaign and friends to any link, see which GA4 channel the visit will land in, and tag a whole list of URLs at once.
  • Google Tag Snippet Generator — Enter your GA4 measurement ID, Google Ads ID or Tag Manager container ID and get install code that is ready to paste — with Consent Mode v2 defaults, cross-domain linking, debug mode, manual page views and cookie settings switched on only when you need them.
  • GTM Snippet Generator — Enter your GTM container ID and get the Google Tag Manager install code for the <head> and <body>, with Consent Mode v2 defaults placed before the container so every tag inside it waits for consent.

Frequently asked questions

How do I track a purchase with the Meta Pixel?
Call fbq('track', 'Purchase', { value: 49.99, currency: 'USD' }) on the order confirmation page, after the base code. Choose Purchase here, fill in the value and items, and copy the code.
What is an event ID for?
When the same conversion is sent from the browser pixel and from your server (Conversions API or TikTok Events API), the platform uses a matching event ID to count it once. Use something unique like the order ID.
Do I need to hash emails for the Conversions API?
Yes. Meta requires email, phone and other customer details hashed with SHA-256 after normalizing — lowercase and trimmed for emails, digits with country code for phone numbers.
Where do I find my LinkedIn conversion ID?
In Campaign Manager go to Analyze → Conversion tracking, open the conversion and choose the event-specific JavaScript option; the number in the code is the conversion ID.
Can I install Ad Pixel Event Code Generator as a web app and use it offline?
Yes. Ad Pixel Event Code Generator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

Related tools