Skip to content

Webhooks

A Webhook lets Aimtell notify your server the moment something happens. Whenever the event you choose occurs, we send a request to a URL you control, with details about the event attached as URL parameters. This is useful if you want to store push activity in your own database, sync it to a CRM, or trigger something on your end.

You can create a Webhook for three types of events:

  • New Subscriber - someone opts in to your push notifications
  • Push Notification Click - a subscriber clicks one of your notifications
  • Push Notification Impression - a notification is displayed to a subscriber

Setting Up a Webhook

  1. Click Websites in the sidebar
  2. Select Edit next to the website you want to set this up for
  3. Open the Webhooks tab at the top of the page
  4. Hit Add Webhook, select which type, input the URL you want, and press save

You can set up multiple webhooks for any website you have set up web push for.

Image

What We Send

Webhooks are sent as a POST with the following URL parameters added:

New Subscriber

URL ParameterDescription
id_siteWebsite ID
subscriber_uidSubscriber ID
webhook_sourceStatic text - aimtell.com

Example:

https://yoursite.com?id_site=33&subscriber_uid=0fc77bb3-4c07-42bd-dfe9-04031f1b4d2b&webhook_source=aimtell.com

Push Notification Click

URL ParameterDescription
id_siteWebsite ID
campaign_idCampaign ID
subscriber_uidSubscriber ID
push_sourceStatic text - aimtell.com

Example:

https://yoursite.com?id_site=33&campaign_id=100313&subscriber_uid=0fc77bb3-4c07-42bd-dfe9-04031f1b4d2b&push_source=aimtell.com

Push Notification Impression

URL ParameterDescription
id_siteWebsite ID
campaign_idCampaign ID
subscriber_uidSubscriber ID
push_sourceStatic text - aimtell.com

Example:

https://yoursite.com?id_site=33&campaign_id=100313&subscriber_uid=0fc77bb3-4c07-42bd-dfe9-04031f1b4d2b&push_source=aimtell.com

Webhook Variables (Advanced)

If you'd like to pass some additional information in the Webhooks for Push Notification Clicks and Push Notification Impressions, you can take advantage of the additional Webhook Variables that are available for use. Simply add the URL Parameters listed below into the Webhook URL to pass the data associated with it.

Webhook VariableDescription
{title}Push title
{body}Push body
{link}Destination link
{push_type}Type of push campaign (RSS, manual, etc.)
{browser}Browser

You choose the parameter names yourself- just set the value of each one to the variable you want. For example, this Webhook URL:

https://yoursite.com/hook?title={title}&body={body}&push_type={push_type}&browser={browser}

Would be sent to your server looking something like this:

https://yoursite.com/hook?title=Your%20order%20shipped&body=Track%20it%20here&push_type=manual&browser=chrome&id_site=33&campaign_id=100313&subscriber_uid=0fc77bb3-4c07-42bd-dfe9-04031f1b4d2b&push_source=aimtell.com

Note: The variables above only work in Notification Click and Notification Impression Webhooks.