@mattab opened this Issue on September 14th 2014 Member

Webhook for Matomo

The goal of this issue is to trigger webhooks when specific actions occur on the website such as Goals conversions, ecommerce, events, content interactions...

Examples & future uses for Matomo webhooks

  • Receive an email when a particular Goal is converted
  • Get notified by SMS whenever an ecommerce sale occurs
  • send message to Zapier.com which integrates with dozens of webservices #5938
  • Maybe the message could be posted to WebSockets too #6054
  • Send a message to a chat channel on IRC, Slack when there is a particular Contents interactions tracked #4996
  • Send a Desktop notification whenever a goal or given event occurs #4530

Feel free to contribute ideas in comments!

@johnaschroeder commented on April 18th 2019

I'd love to see Matomo offer some type of external notification capability for events and/or goals via webhooks. That would allow me to have Matomo hit our API when a user hits a goal and we can then trigger an email/SMS/push or other integration to message them. Just POSTing the unique goal and user id that we set in Matomo would do it.

Sending an email after a user registers is easy. Sending them one after they complete a multi-step goal isn't so easy. Nor is tracking when a user does 3 out of the 4 things I want them to do after on-boarding but fails to complete the 4th. I'd love to send them a message with encouragement and helpful tips, and send it once and only once.

Triggering any sort of external action from an analytics service seems like a hole in the market. There are tons of analytics products, and plenty of messaging products, but linking the two together is proving elusive. I've found a ton of integrations for getting information into analytics products, but I can't find one that can get information out automatically, either through webhooks or some other mechanism.

I used and like Mixpanel at two former companies. It seems like the closest product that isn't aimed strictly at brand/enterprise only account. It offers email, sms, and push notifications that you can build into campaigns around events and user actions. Unfortunately it's literally split in two (analytics and people) and it's not possible to drill down from the analytics side to a person level. The people side has the events for each user, but it's awkward transitioning back and forth. Although they have a nice free package to entice startups, it gets up into the thousands per month in a hurry as you scale.

Count.ly offers push, but not email or SMS. Plus the community version of count.ly is pretty stripped down and all the interesting bits are in enterprise. All their development also seems focused on growing the enterprise plugins, and it starts and hundres

This issue seems like it's more focused on notifications to product managers than users, but the same infrastructure could power a more generalized notification system. The ability to build a series of notifications as users achieve (or don't achieve) goals is fantastic and could be a big differentiator for Matomo. I hope this gets another look!

@tsteur commented on April 18th 2019 Member

@johnaschroeder be great to learn a bit more about the use cases. When you talk about notifications I understand it's not you who wants to receive those notifications, but you want to send notifications to users automatically? For example they will to complete a specific sequence etc.

So far we don't really have any data in Matomo to email/sms users etc. unless you use the UserId feature where some users set the email address. I suppose you have the email addresses for your visitors eg they log in to your platform? or they filled out a form before? I guess the biggest challenge is really having those details in Matomo eg through Custom Dimensions or the userId feature.

The beauty is when you self host Matomo On-Premise, and you have some developer skills (or someone in the company), this could be potentially fairly easily developed.

@johnaschroeder commented on April 18th 2019

@tsteur yes, we want to communicate with users around goals. I'd be fine with using goals to accomplish that, but have a look at the granular targeting the mixpanel offers for messages here.

I assumed that I would pass Matomo our internal user_id (uuid) when a user registered as userId, and also email, type of user, etc to build up a profile. That's what we typically did with mixpanel. They have an api for converting an anonymous user to a registered user where you can pass user id and details. Then I can segment by type of user, total purchases, number of actions, etc. I want to be able to communicate on a personalized basis with users based on who they are and what they've done.

All I would expect for functionality is being able to add an external API endpoint (and likely an auth token) to a goal (and later maybe a filter, like user_country = USA). When a user achieves the goal, you post the goal id and user id to the endpoint with the token in the header. Now I can catch that and fire off some action of our choosing, like a push with a video on next steps or other things to explore.

Right now we are looking at starting with mixpanel and then migrating to snowplow (open source) with either an open source analytics package on top of that (metabase etc) or maybe Indicative. That looks very slick. I really love the idea of all our data about a user from analytics, our database, stripe, etc in one place and then being able to set up automated, customized communication paths based on all the data. We're also keeping our eye on gitlab's meltano project.

As for developing it ourselves around Matomo, we're a tiny startup and while analytics are super important we need 99% of our developer focus on shipping product until we get a little bigger. That said, I think this kind of feature would be appealing to a much broader audience and help you differentiate yourselves further.

@tsteur commented on April 23rd 2019 Member

Thanks for the explanation. So just to fully understand: The notifications (email, sms, push) wouldn't be send from us in real time but instead you trigger it based on a goal/segment/...? And just to be sure as you mention it... your external API endpoint would actually send the notifications or would you expect this Matomo to do?

And the webhooks would be fired immediately though maybe (as usual for webhooks).

@johnaschroeder commented on April 26th 2019

I'd suggest starting with just a webhook where we send the communication. Then you can add on email/sms/push creation, integrate with sendgrid/aws/mailgun, twillio, etc and presto you're mixpanel.

@mattab commented on August 7th 2019 Member

I'd suggest starting with just a webhook where we send the communication. Then you can add on email/sms/push creation, integrate with sendgrid/aws/mailgun, twillio, etc and presto you're mixpanel.

Thanks for the feedback @johnaschroeder - renamed the issue and simplified the issue description.

Powered by GitHub Issue Mirror