Pixel Custom Events

Send custom events with the FunnelTrack pixel

Fire any event you want — Item View, Add to Cart, Email Opt-In, custom milestones — directly from your site's HTML or your tag manager. Drop in a one-liner where the event happens, optionally attach hashed email or phone, and FunnelTrack routes the event to every connected destination with full attribution.

When to use this
Pixel Custom Events is the catch-all source. If something can't be tracked through one of our deeper integrations (ClickFunnels, HighLevel, Calendly, Typeform, etc.) — or if you just want a quick win — fire it with a one-liner from your site. Identity matching happens automatically via the FunnelTrack pixel session, and any hashed email or phone you pass lets us stitch the visitor to a contact record across sessions.
What you'll need
  • The FunnelTrack pixel deployed on every page where you want to fire custom events
  • At least one connected destination (Meta CAPI, Google Ads, GA4, TikTok CAPI, etc.)
  • The Pixel Custom Events source connected in FunnelTrack → Integrations

1. Fire a custom event

One line of JavaScript, anywhere on your page.

1

The simplest call

Once the FunnelTrack pixel has loaded, the global window.ft exposes a single method:

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

That's it. 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 for the ride.

2

Add identity (recommended)

Pass email or phone in the params and FunnelTrack hashes them in the browser with SHA-256 before they ever leave the page. Raw values never touch our servers.

window.ft.event("email_opt_in", {
  email: "jane@example.com",
  // phone, first_name, last_name, city, region, zip, country also accepted
});
HTTPS required for hashing
SHA-256 hashing uses window.crypto.subtle, which only works over HTTPS (or localhost). On plain http://the user-data fields are dropped and the event still fires — but you won't get cross-session contact matching. Make sure your site is on HTTPS.
3

Add value and currency

For monetary events (Add to Cart, Purchase, Subscribe, etc.) pass value and currency. Both become event properties — destinations that support revenue events (Meta CAPI, Google Ads, GA4, TikTok CAPI) will forward them.

window.ft.event("add_to_cart", {
  value: 49.00,
  currency: "USD",
  // mix freely with user data:
  email: "jane@example.com",
});

2. Copy-paste recipes

Drop these straight into your site or GTM.

Item View

Fire on a product / collection / pricing page load. Replace PRODUCT_ID etc. with your own values (server-rendered or pulled from the page).

<script>
  // Wait until the FunnelTrack pixel has loaded on the page,
  // then fire the event.
  (function fire() {
    if (window.ft && window.ft.event) {
      window.ft.event("item_view", {
        item_id: "PRODUCT_ID",
        item_name: "PRODUCT_NAME",
        value: 49.00,
        currency: "USD"
      });
    } else {
      setTimeout(fire, 50);
    }
  })();
</script>

Add to Cart

Wire to your Add-to-Cart button's click handler:

<script>
  document
    .querySelector("#add-to-cart")
    .addEventListener("click", function () {
      window.ft.event("add_to_cart", {
        item_id: "PRODUCT_ID",
        value: 49.00,
        currency: "USD"
      });
    });
</script>

Email Opt-In

Fire after a newsletter / lead-magnet form submits successfully. Pass the email — FunnelTrack hashes it in-browser:

<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>

3. Deploy via Google Tag Manager

Same one-liner, wrapped in a Custom HTML tag.

1

Create a Custom HTML tag

In GTM → TagsNew Custom HTML. Paste the snippet that matches your event, swapping any literal values for {{ Data Layer Variable }} references where useful.

<script>
  if (window.ft && window.ft.event) {
    window.ft.event("add_to_cart", {
      item_id: {{ DLV - product_id }},
      value: {{ DLV - product_value }},
      currency: "USD"
    });
  }
</script>
2

Pick a trigger

Use whatever trigger fits the moment — a click trigger for Add to Cart, a form-submit trigger for Email Opt-In, a page-view trigger for Item View. FunnelTrack uses the pixel session that's already loaded on the page, so the event will be tied to the right visitor regardless of which trigger fired it.

Pixel must fire first
If you load the FunnelTrack pixel through GTM, make sure the pixel tag is set to fire on All Pages and runs before any custom event tag. The simplest way is to give the pixel tag a high firing priority (e.g. 1000) and leave custom event tags at the default. For click / submit triggers it doesn't matter — the pixel has plenty of time to load before the user interacts.

4. Route the event to your ad platforms

Map each event name once, then it fans out automatically.

In FunnelTrack, open Integrations→ the destination you want (Meta CAPI, Google Ads, GA4, etc.) → choose Pixel Custom Events as the source.

Click Add Event, type the exact event name you used in your pixel call (for example, add_to_cart), and pick the destination standard event you want it to map to (Meta's AddToCart, Google Ads' add_to_cart, etc.). Save. Done.

Same event, multiple destinations
Map the same event name on each destination's Pixel Custom Events page. One add_to_cart from your site can fan out to Meta, Google Ads, GA4, and TikTok in one webhook trip — each platform gets the appropriate standard event name and the value / currency you passed in.

Reference

Every parameter the pixel accepts.

User-data fields (hashed client-side)

These fields are SHA-256 hashed in the browser before the event leaves the page. Normalization rules match the major ad platforms' advanced matching specs.

FieldHow it's normalized before hashing
emailLowercased and trimmed
phoneAll non-digit characters stripped (E.164 sans +)
first_nameLowercased and trimmed
last_nameLowercased and trimmed
cityLowercased, all whitespace stripped
regionLowercased and trimmed. 2-letter state / region code recommended (e.g. 'ca' for California).
zipLowercased and trimmed. First 5 digits recommended for US zips.
countryLowercased and trimmed. 2-letter ISO code (e.g. 'us').

Standard event properties

Anything you pass that isn't a user-data field becomes an event property. These names match destination platforms' conventions so they map cleanly:

PropertyDescription
valueNumeric value (e.g. 49.00). Forwarded to revenue-capable destinations.
currencyISO-4217 currency code (e.g. USD).
item_idProduct / SKU identifier. Optional.
item_nameHuman-readable product name. Optional.
Any other keyStored as a custom property on the event and available for filtering and mapping.

Things to know

  • Event name can be any string. Use snake_case for consistency. Match the name exactly when you map it on each destination.
  • Hashing is client-side. Every user-data field — email, phone, names, geo — is SHA-256 hashed in the browser before the event leaves the page. Raw values never touch FunnelTrack servers.
  • HTTPS required for hashing. On http:// the event still fires, but user-data fields are dropped. Move your site to HTTPS for full identity matching.
  • Pixel session does the click-ID work.You don't have to pass gclid, fbclid, etc. — the pixel already captured them and FunnelTrack attaches them when the event dispatches.
  • No deduplication needed. Custom events from the pixel are treated as web events, with the same attribution path your page views go through.
← Back to HelpStill stuck? Open a support ticket in your dashboard.