Don’t know what Code-Triggered events are? Learn more: Understanding Events and Conversions in ShortPen
Before you start
- ShortPen Pixel installed on your site. Events require the Pixel.
- Event tracking enabled on the link that will receive conversions. Conversions start only after the event exists.
- Access to your site/app code (you’ll paste a small JS snippet).
How to trigger an event with code: Steps
1
Create the event
Go to Events → New Event, name it clearly (e.g., Signup), select With code, then Next.
2
Copy the snippet
In Trigger event by code, click Copy.
3
Paste it where the action happens
Place the snippet on the page(s) or in the handler that confirms the action (e.g., after a form submit or purchase confirmation).
4
Save the event
Click Save to finalize the configuration.
5
Test it (real-time)
Open the Event Testing Panel to confirm the event fires.
FAQ
What’s the difference between URL-triggered and code-triggered events
What’s the difference between URL-triggered and code-triggered events
URL-Triggered events fire when visitors land on a specific page (e.g., a thank-you URL). Code-triggered events fire via JavaScript when your app confirms an action. Both require the Pixel.
Learn more: Understanding Events and Conversions in ShortPen
Do I need to recreate links to track a new event
Do I need to recreate links to track a new event
No. If Enable Tracking Events is on for the link, new events will track from the moment they’re created, future actions only.