Share this guide
Pixel Custom Events

Send pixel events directly (HTML / JavaScript)

Once the FunnelTrack pixel is on the page, call window.ft.event() where the event happens. The pixel session carries all the attribution for you.

Prefer no code?
If you run Google Tag Manager, the FunnelTrack Pixel custom template does all of this from the GTM UI — see the Google Tag Manager guide.

1. Fire an event

One line of JavaScript, anywhere on the page.

1

The simplest call

After the pixel has loaded, call window.ft.event with an event name and optional params:

window.ft.event("event_name", { /* optional params */ });

The event is tied to the current pixel session, so all click IDs (gclid, fbclid, ttclid, etc.) and the original ad landing context come along automatically.

2

Add contact info (recommended)

Pass email, phone or name/address fields and FunnelTrack hashes them in the browser with SHA-256 before they leave the page. Raw values never reach our servers.

We recommend attaching user-provided data
Whenever you have it, send the visitor's email and phone (plus name or address if available) with the event. It's hashed in the browser and used two ways:
  • Enhanced Conversions and Advanced Matching. Google Ads, Meta and other platforms use it to match more conversions to real people, which improves reporting and optimization.
  • Offline conversion tracking in FunnelTrack. It ties the visitor to a contact, so later offline conversions from your CRM or a custom webhook can match back to their original web session and ad click.
window.ft.event("email_opt_in", {
  email: "jane@example.com",
  // phone, first_name, last_name, city, region, zip, country also accepted
});
3

Add value & currency

To give an event a value (a trial's expected revenue, a qualified lead's worth), pass value and currency. Destinations that support values (Meta CAPI, Google Ads, GA4, TikTok CAPI) forward them.

window.ft.event("start_trial", {
  value: 99.00,
  currency: "USD",
  email: "jane@example.com",   // mix freely with contact info
  plan: "pro"                  // any other key is kept as a custom property
});
Want to identify visitors without sending an event?
Use window.ft.identify(). See Identify visitors in code.

2. Copy-paste recipes

Drop these straight into your site.

Demo Request (on form submit)

<script>
  document.querySelector("#demo-form").addEventListener("submit", function (e) {
    var form = e.target;
    window.ft.event("demo_request", {
      email: form.querySelector('input[name="email"]').value,
      phone: form.querySelector('input[name="phone"]').value,
      company_size: form.querySelector('select[name="company_size"]').value
    });
  });
</script>

Trial Started (on the welcome page)

Render this on the page a new user lands on after signing up. Replace the placeholder values with your own (server-rendered from the new account).

<script>
  window.ft.event("start_trial", {
    value: 99.00,
    currency: "USD",
    email: "NEW_USER_EMAIL",
    plan: "pro"
  });
</script>

Email Opt-In (on submit)

<script>
  document.querySelector("#newsletter-form").addEventListener("submit", function (e) {
    var emailEl = e.target.querySelector('input[type="email"]');
    window.ft.event("email_opt_in", {
      email: emailEl ? emailEl.value : undefined
    });
  });
</script>
HTTPS required for hashing
SHA-256 hashing uses window.crypto.subtle, which only works over HTTPS (or localhost). On plain http:// the contact fields are dropped and the event still fires — but you lose cross-session contact matching.

More pixel guides