About "Create New Account" button and tracking Sign Ups

Hello,

On earlier versions Create New Account button was passive until all sign up fields (required fields) filled and I was tracking new sign ups by track Create New Account button clicks with tag manager.

But now this button is active and clickable without filled all sign up fields.

If a visitor click this button without filled all fields click is counted.

How can i solve this? Thanks.

image

1 Like

Any comments please :slight_smile:

I’m not seeing anyway to only track successful clicks on the signup button. You could try tracking clicks of the “Click here to activate your account” button:

image

It is also possible to track signups with a User Event webhook. That is a very different approach than what you are currently using though. You’d need to configure an external service to listen for the webhook and then filter the user webhooks to only collect data when the X-Discourse-Event: user_created header is set in the request.

Thanks. Yes. But i can not use this for Social Signups.

It might be possible to hook into the user_created event and use that to send data to an analytics platform. If that was the case, it would be possible to do something like this. :warning: Note that this code doesn’t work:

<script type="text/discourse-plugin" version="0.11.0">
api.onAppEvent("user:created", user => {
    if (user) {
        window.dataLayer.push({
        'event': 'userCreated'
        });
    }
});
</script>

The above code is following the pattern outlined here: Setup Google Tag Manager for Analytics.

As far as I can tell, the user_created event is not available on the client, so the above code will not work. If anyone knows if it’s possible to catch the user_created event on the client, please let me know.

2 Likes

I am also very eager to find this answer :slight_smile:

1 Like