Tracking sign up conversion rates?


(Travis) #1

Is there a way to track the conversion rate of sign ups? I would like to assign a track_pageview or some kind of identifier to sign up completion so that I can track the most effective referrals.

If this doesn’t exist or is difficult to implement on one’s own, I think it should be built in. e.g. throw a /signedup pageview when a user has signed up for the first time. This way a goal in analytics can easily be created.


Link to /raw/ redirects to homepage for anon
(Travis) #2

I’m going to bump this (I know, sorry) because it received no attention but I’m not sure why. I feel like it is critical to the success of any site. The ability to add code to different steps in the sign up process should be built into Discourse, in my opinion.

Has anyone figured out a way to implement this well?


(Tobias Eigen) #3

have you considered google analytics?


(Travis) #4

Google Analytics would still need to fire a pageview or event that would trigger the goal. That would need a plugin or something built into the settings to drop some javascript during sign up.

Plus, that doesn’t solve the problem with optimizing on conversions. Google Analytics would be for reporting after the fact.


(Mittineague) #5

Are you thinking something like a plugin where the “Create New Account” grabs the page being viewed when a new member Registers?

What if they Register, but fail to follow through?

Seems like it could be involved, but not entirely impossible methinks.


(Tobias Eigen) #6

What is precisely the goal here?

If you want to track signups, you can do that via the admin user list and dashboard.

If you’re trying to track and gain insight into which users are doing the best promotion of your site, look at the “nice share” badge functionality, which makes use of the ?u=username on the URL to give credit to users for successfully sharing posts and bringing in viewers.

https://meta.discourse.org/t/tracking-sign-up-conversion-rates/15777/5?u=tobiaseigen 

Perhaps more could be done to capture referral info at signup, which might be saved into a log or hidden user field.

Still trying to read between the lines what it is you are trying to achieve.


(Travis) #7

The goal is to fire 3rd party pixels upon conversion. This is used in advertising to optimize on conversions (rather than clicks or impressions).

This is very easy to do if you have access to a “thanks for signing up” type page where you would simply insert a code snippet from the SSP or DSP. With Discourse, though, the only access to inserting code in the admin without a plugin is global and there isn’t a pageview for “completed” signups (as it redirects to a full page).

The ideal scenario would be to support this in the UI so it could be easily changed. However, a plugin would be a decent solution as well.


(James Cook) #8

Hopefully this will help with getting data out of Discourse automagically Discourse Integrations | Zapier

If anyone else is interested in this, please vote for Discourse on Zapier to make this happen!


(James Cook) #9

As a follow up to this, Discourse does offer Webhook functionality which I’ve used to trigger a POST request when a user signs up. Using either IFTTT or Zapier, you can capture that request and then POST a follow up Event tracking request to Google Analytics.

I’ve successfully got this to work in IFTTT very simply however for some reason code that worked locally wasn’t producing the expected results on Zapier. The code I used locally to emit an event using JS is:

var querystring = require('querystring');
var http = require('http');
var output = {}

var postData = 'v=1&t=event&tid=UA-XXXXXXXX-X&cid=e0df0e4c-e5eb-44a8-bb14-d8823165c68b&ec=membership&ea=signup&dh=forum.evowners.com';

var options = {
  hostname: 'www.google-analytics.com',
  port: 80,
  path: '/collect',
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Content-Length': Buffer.byteLength(postData)
  }
};

var req = http.request(options, function(response) {
  response.on('data', function (chunk) {
      output.response = chunk;
  });
});

req.write(postData);
req.end();

However, even though I’m seeing the events in my GA account, they are not tied to a user because GA uses Client IDs to track users and this is not emitted by Discourse when making the initial POST request. This means the events are basically orphaned events that don’t get included in any Google Analytic Goal Conversions.

The only way of solving this, is to send an event from Discourse directly to GA when a user signs up using the following code:

ga('send', {
  hitType: 'event',
  eventCategory: 'membership',
  eventAction: 'signup',
  eventLabel: 'Discourse User Signup'
});

(Daniel Marquard) #10

I stumbled upon this topic after realizing that my conversion tracking by URL (/community/users/account-created) was not working. The complete solution would be to fire an event on the account created page, which can be easily added in login.activate_email.

Using @jamesmarkcook’s GA event function, just add this code to the text:

<script type="text/javascript">ga('send', {
  hitType: 'event',
  eventCategory: 'membership',
  eventAction: 'signup',
  eventLabel: 'Discourse User Signup'
});</script>

Once added, you can configure an event-based conversion goal (with no value) in Google Analytics. The limitation with this is that I can see this possibly being used in other places, which could inflate conversion data.

I’d love to see real granular event tracking in Discourse. That kind of data would be super insightful.


(James Mc Mahon) #11

I was able to track signups by adding a URL goal of “/users/account-created”


#12

@SouperC How does this work for you?]

This is what I have set up but it’s never given any data:


(James Mc Mahon) #13

Hey nick. Just discovered this…I think discourse might not have the GA code on that page.

Around the time I did this I was using cloud flare to deliver the GA code, which makes it appear on all pages as it loads it with the request.

One other thing, I noticed you don’t have a leading / in the URL. I don’t know if that makes a difference or not.


(M Musa) #14

I had a similar issue. I configured GA under Settings and data was being collected for everything except users/account-created. The ga.js script was not implemented in the account creation success page. Someone pointed out on another topic that they were also having the same issue and resolved it by inserting the GA code directly into the head section under Customize. It solved my issue.


#15

Awesome thanks will try this. Did you remove the GA universal ID from the settings panel to prevent duplicate data when you put the GA code in the head section?


(M Musa) #16

Yes, removed it from settings


(James Mc Mahon) #17

Also noticed my (reported) bounce rate go from 16% to 60% right after I stopped using ga.js from cloudflare.

I’ve added these to under “head” in customize and will see what happens.


#18

@meenxo @SouperC this has worked for me, cheers!


(James Mc Mahon) #19

Works for me under “head” in custom CSS. Only GA though, not Piwik. If I figure something out with piwik will circle back.