Triggering custom function on portal signup

Hey, I’m trying to integrate Plausible Analytics with the new membership portal and I was just wondering if anyone had a particularly good way of doing that.

Specifically what I want is for the function plausible('Signup') to run whenever somebody signs up on the membership portal, so that in my analytics I can identify the kinds of people who are actually signing up.

And of course one way to do that is a big mess of javascript with a ton of nested selectors that waits until everything is loaded and sneaks in an event listener on the ‘continue’ button, but I thought somebody here might know of a more elegant solution.

1 Like

Hi @Raymond_Douglas !
I want to do exactly the same thing. Did you find an easy solution?

Unfortunately not! The best I could do was add an event listener after the portal loads.

If you really want to pull this off properly I think you’d need to do a whole lot of custom membership flow. But if you come up with something please let me know!

Thanks for your response, how did you set up the event listener?
This is already enough to track conversions right ?

No, it’s very hard to get a good measure of conversions this way. We get a rough approximation by having a plausible function trigger when somebody clicks on the portal button, but it’s not enough to tell when people are actually converting, not least because that’s not the only way to open the portal.

The problem is, the buttons which you use to sign up, on the portal, do not actually exist when the page is loaded, so you can’t directly and immediately add an event listener to them. And adding them any other way seemed unreasonably fragile to us.

what about being able to have a auto response when someone does sign up?

Jon, if you’re trying to set up an autoresponse you might find this thread useful - Ghost email subscription welcome page/autoresponder - #11 by EmpiricalEE