dub icon indicating copy to clipboard operation
dub copied to clipboard

Click event webhooks

Open steven-tey opened this issue 2 years ago • 4 comments

A webhook callback feature to call any arbitrary API after a click is recorded (with a few defaults like Slack, email etc.)

Preferably customizable on a per-link basis.

Example use cases:

  • Create custom links for leads/prospect and be notified anytime a lead engages with the link.
  • https://twitter.com/taishik_/status/1730980896768180649

steven-tey avatar Nov 06 '23 01:11 steven-tey

May I work on this ?

aakash2330 avatar Nov 06 '23 14:11 aakash2330

@steven-tey @aakash2330 Have you started working on this?? @aakash2330 if you have not need something then please free to comment.

VishalMCF avatar Nov 07 '23 22:11 VishalMCF

This will be a game-changing feature for our firm's implementation of dub. I'm happy to help develop, let me know.

Meanwhile, here are some initial thoughts/ideas on how I could see us using this feature. I'm just getting familiar with this project as a Dub.co user, so please disregard the following if it doesn't fit!

API interface thoughts

  • POST /links: a callbackUrl parameter that takes a string URL

  • POST /links: a callbackPayload parameter that takes a JSON payload allowing the caller to specify fixed link attributes included in the webhook request. Only including properties available in the GET request is probably the way to go. I could also see this saving bandwidth all around, e.g. we would likely only be interested in a small subset of the data available from the full GET request response such as the key property

  • POST /links/bulk: same as single POST

  • GET /links: return the value of the callbackUrl and callbackPayload parameters above

  • PUT /links: edit the callbackUrl and callbackPayload parameters

UI interface thoughts

It'd be nice to edit this within the "edit" and "create link" modals, below the current Geo Targeting input field:

edit image

create image

Additional motivation

I think a few defaults like Zapier and IFTTT (in addition to slack and email) would be awesome, however, they're very much in the "nice to have" bucket. If (Dub) users leverage these platforms they probably know how to copy and paste the webhook from those platforms to set this up themselves.

For us, Dub links sit as part of our ads platform where an asynchronous fan-out strategy using the webhooks would be amazing. I intend to chain some lambda functions that take the webhook request from Dub and add data to our databases, send push notifications to our apps and more generally let our end users interact with their link-data in real time.

thinkjrs avatar Dec 28 '23 20:12 thinkjrs

Hi Team,

I've been exploring the functionalities of dub.co for URL shortening and tracking click-through rates. It's been quite effective for monitoring general engagement, but I'm looking to enhance the system with real-time alerts.

Currently, I'm considering integrating AWS SES for the emailing component. My question is: does the existing API support triggering an email notification upon a link click? If such a feature is available, I'd be grateful for a brief rundown on how to set it up or any resources that could guide me through the process.

I'm aiming to streamline my workflow, so having this automated notification would be incredibly beneficial. Looking forward to any insights you might have on this.

mindninjaX avatar Mar 27 '24 15:03 mindninjaX