App lifecycle (install, uninstall)
Get notified when your elNudge app is installed or uninstalled.
elNudge sends webhook events when key lifecycle events happen on your account. Two events cover the app itself: app.installed and app.uninstalled.
Registering a webhook endpoint
- Go to Dashboard → Settings → Webhooks.
- Click Add endpoint.
- Enter your HTTPS endpoint URL.
- Select the events you want to receive.
- Copy the Signing Secret — you will need it to verify incoming requests.
Your endpoint must be publicly reachable and must respond with a 200 status within 5 seconds. Any other status, or a timeout, is treated as a delivery failure.
app.installed
Fired when a merchant completes the installation flow and the elNudge app becomes active for a site.
When it fires
- After a new site is created and the SDK script tag is confirmed.
- After a Shopify merchant authorises the app through the Shopify App Store.
Payload
{
"event": "app.installed",
"site_id": "site_01HXYZ",
"shop_domain": "your-shop.myshopify.com",
"plan": "growth",
"timestamp": "2026-05-01T09:00:00Z"
}
| Field | Type | Notes |
|---|---|---|
event | string | Always "app.installed" |
site_id | string | Unique identifier for this site in elNudge |
shop_domain | string | Present only for Shopify installs |
plan | string | Active plan at time of install: starter, growth, scale, enterprise |
timestamp | string | ISO 8601 UTC |
app.uninstalled
Fired when a merchant removes the elNudge app or deletes a site from the dashboard.
When it fires
- When a merchant clicks Delete site in Dashboard → Settings.
- When a Shopify merchant uninstalls the app from their Shopify admin.
Payload
{
"event": "app.uninstalled",
"site_id": "site_01HXYZ",
"shop_domain": "your-shop.myshopify.com",
"timestamp": "2026-05-01T09:30:00Z"
}
| Field | Type | Notes |
|---|---|---|
event | string | Always "app.uninstalled" |
site_id | string | The site that was removed |
shop_domain | string | Present only for Shopify installs |
timestamp | string | ISO 8601 UTC |
Best practices
Always verify the signature before processing. Every webhook request includes an X-ElNudge-Signature header. Reject requests where the signature does not match. See Webhook Signature Verification for code examples.
Respond quickly, process asynchronously. Your endpoint must return 200 within 5 seconds. If your handler needs to do database writes, send emails, or make further API calls, acknowledge the webhook immediately and queue the work in a background job.
Handle duplicate deliveries. elNudge guarantees at-least-once delivery — the same event may arrive more than once. Use site_id + event + timestamp as a composite key to deduplicate. Storing processed event signatures in a short-lived cache (e.g. Redis with a 24-hour TTL) is a common pattern.
Do not rely on delivery order. In rare failure scenarios, events may arrive out of order. Design your handler to be idempotent regardless of order.