Tracking user signups for Facebook app

Status
Not open for further replies.

a!!!!1

Banned
Apr 20, 2008
508
7
0
I'm developing a Facebook app and am planning to advertise it a few different ways, for example Adwords, FB Ads, forum posting, etc. When people click the ads, they'll be taken to the Facebook page for the app. I was wondering if there's a way to track the number of users who signed up for each referrer, so I know which forms of advertising are the most useful?
 


Unless you find a way to pass data from the referrer to the app, it won't be possible, since at the end you'll only see facebook as the refferer to your app. And it's not like you can look back several steps.

The only thing I can thing of, is if you have control of both the ad location and the end destination, is to set a cookie or set a session. That way regardless of the refferer when they reach the app (Which would be running off the same server as your .. landing page for example), you can access their cookie or start session and check the session value to see what got stored (ie: refferer ID).

But seeing as you can't control google's server (for adsense), that's kind of a bust.

You might have to create a landing page for the app, that can get the refferer from the ad, then redirect to the FB page to download the app. That would be the simplest way to do it, rather than just direct linking to the App download page. (then you can compare sessions/cookies to the users who actually installed the app, and see how many out of all those who visited the landing page actually installed the app)
 
You might have to create a landing page for the app, that can get the refferer from the ad, then redirect to the FB page to download the app. That would be the simplest way to do it, rather than just direct linking to the App download page. (then you can compare sessions/cookies to the users who actually installed the app, and see how many out of all those who visited the landing page actually installed the app)

Yeah that sounds like the best idea. I've never really messed with setting cookies before so you'll have to excuse my noobness, but would I also be able to extend this to be able to see user activity based on referrer (for example, Source A referred more users than Source B, but Source B users have spent more time playing the app than Source A's users)?
 
Yeah that sounds like the best idea. I've never really messed with setting cookies before so you'll have to excuse my noobness, but would I also be able to extend this to be able to see user activity based on referrer (for example, Source A referred more users than Source B, but Source B users have spent more time playing the app than Source A's users)?

That's where a database would come in.

Let's say for example you use the following urls for your ads.

http://www.mydomain.com/fbapp/google/
http://www.mydomain.com/fbapp/fbad/
http://www.mydomain.com/fbapp/forumsite/

Course /fbapp/ would just be a mod_rewrite on your site
ie:
Code:
RewriteRule ^fbapp/(.*)/ fblanding.php?ref=$1
So that when the ad reaches your fblanding.php landing page, you can then set the cookie for whatever was the $ref value. At this point of time you could if you wanted to add an entry to the database for refferals to see simply how much traffic you were getting from each refferal and to add a unique id for that member to match up later.

Then when they goto install your facebook app, you can then make your fb app (assuming it's written in PHP) check for that cookie, and if it finds a cookie it takes the referal ID plus their unique id and adds it to another table. From this you can match up and confirm three things.

1) How many people were refered to the landing page and from where.
2) How many of them actually installed the application.
3) How many did not have a refferal ID at all (ie: directly finding the app themselves).

Course once the FB app has checked for cookie, found it, and added the database entry you then want to clear the cookie from their browser so you don't have duplicate entry the next time they open the app.
 
So after that, every time they open the app, it'll match their user ID in the database and I'll be able to see how many times they've accessed it?
 
So after that, every time they open the app, it'll match their user ID in the database and I'll be able to see how many times they've accessed it?

Well that's a different thing. You could add that on if you wanted to.

Two things from the advertizing.
1) The refferal ID (who reffered them, google, fb, a forum, that is based on what you put in the second /*/)
2) generate a unique id (usually an md5 hash of the machine id + time in miliseconds).

It takes those and creates a cookie on the user side, you can also add to the database that the person has accessed the landing page and their id/cookie-id.

The landing page links to your FB app download page.

Once they've installed the FB app and ran it, the app will check to see if the user has a cookie containing a ref id and a unique id. If it does it will then add to the database that such and such id+cookie has actually commited to isntalling the fb app. But you want to remove the cookie at that point so that it doesn't add to the database again the next time they run the app.

From there you now have in the database who reffered them, and if they actually installed the app or not.

From there you could additionally add to a database their actual FB username and keep a tally of how many times they use the app if that is important to you. But thats a seperate issue all together from the 'tracking' of reffers and installation.

You have any experience with PHP/MySQL? Or Cookies/Sessions in PHP for that matter?
 
I'm developing a Facebook app and am planning to advertise it a few different ways, for example Adwords, FB Ads, forum posting, etc. When people click the ads, they'll be taken to the Facebook page for the app. I was wondering if there's a way to track the number of users who signed up for each referrer, so I know which forms of advertising are the most useful?

I'm not sure cookie based approaches will work because it's facebook that requests your page, not the user.

Look into the fb:google-analytics FBML tag, which will put your Google analytics code on the facebook page. If you've also defined a post-install page for the app, or even the first page the user hits when they install your application, you can tie that to a goal within GA and track your sources to installs.
 
I'm not sure cookie based approaches will work because it's facebook that requests your page, not the user.

Look into the fb:google-analytics FBML tag, which will put your Google analytics code on the facebook page. If you've also defined a post-install page for the app, or even the first page the user hits when they install your application, you can tie that to a goal within GA and track your sources to installs.

Well Facebook access your server for the app, the app is not hosted on facebook. You have two approaches you can either export the information with face book markup, or you can use an iframe approach. An iframe approach would allow closer access from the user and the app server.

But regardless of being able to check cookies at the app location, the landing page approach would at the very list show which advertizing method is drawing the most traffic to his landing page. That's something he can definitely check without limitation, which seems to be the primary thing he wants to do unless he says otherwise.
 
But regardless of being able to check cookies at the app location, the landing page approach would at the very list show which advertizing method is drawing the most traffic to his landing page. That's something he can definitely check without limitation, which seems to be the primary thing he wants to do unless he says otherwise.

No doubt, but if you use GA and the FBML code to insert your GA JS into the FB page, it's effectively the same as a regular landing page with GA on it. This not only tells you which traffic sources are sending the most traffic, but can tell you which traffic sources are doing what you want them to (install app, click on a certain part of the app, etc)

Looking at my app's logs, the page where I use iframes shows the referrer as the facebook page containing the application, which means I wouldn't see where the user was coming from anyway.

Also, since FB is proxying the requests, you can skip the mod_rewrite stuff and send them directly to your app with a query string:

hxxp://apps.facebook.com/myapp/?ref=ppc

which you'll see in your logs as

204.15.23.170 - - [18/Dec/2008:14:40:01 -0500] POST /?ref=ppc HTTP/1.1 "200" 3585 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 (.NET CLR 3.5.30729)" "-"

So the ref parameter would be available to your application without the need for a rewrite.

Sean
 
No doubt, but if you use GA and the FBML code to insert your GA JS into the FB page, it's effectively the same as a regular landing page with GA on it

But would GA also be able to keep track of how many times users from those referrers access the app?

Basically, here's a run down of what I'd like to keep track of (per referrer):
- Playing time (or number of times they accessed the app, if keeping track of actual paying time is too much hassle). This is the most important thing because I'll make more money off people who play more, versus people who install it and then barely play it or play it once.
- Number of users signed up.
- Amount of traffic sent.

I don't want to know just how much traffic is being sent from each referrer, but also to be able to compare it to the number of users from that referrer who actually signed up for the app, and then see how active users are. Playing time will be, for the most part, the most accurate way to assess revenue earned per traffic source. Then I can compare these stats to see which traffic sources are netting me the best ROI.
 
So the ref parameter would be available to your application without the need for a rewrite.

Obviously yes, but I mentioned the rewrite as a quick and friendly way for him to write a link to his landing page if he chooses to create one. Landing pages tend to create better conversion anyways than linking directly to the FB app installation page.
 
- Playing time (or number of times they accessed the app, if keeping track of actual paying time is too much hassle). This is the most important thing because I'll make more money off people who play more, versus people who install it and then barely play it or play it once.
- Number of users signed up.

The above can be handled by facebook, since facebook sends information to your app if requested, such as user id. You could simply add a tally to the database for a specific user id each time they access the app. Same with # of signups, simply add the user id to the database if they don't already exist, and use the number of records to determine how many sign ups there were. Thsoe two items are actually the easy parts.

- Amount of traffic sent.

I don't want to know just how much traffic is being sent from each referrer, but also to be able to compare it to the number of users from that referrer who actually signed up for the app, and then see how active users are. Playing time will be, for the most part, the most accurate way to assess revenue earned per traffic source. Then I can compare these stats to see which traffic sources are netting me the best ROI.

You can utilize your landing page for this (or as Sean mentioned Google Analystics), compare the overall traffic to the number of signups from your other database entry. Though for the last sentence it contradicts saying you don't want to know how much traffic is being sent from each refferer.
 
Though for the last sentence it contradicts saying you don't want to know how much traffic is being sent from each refferer.

Sorry, I meant to say traffic is the least important out of the 3 things I want to track. Total playing time is a very good estimator for revenue earned, so what I really want is to be able to see a table, something like:

REFERRER / # USERS / TOTAL PLAYING TIME
Source A / 50 / 10 hours
Source B / 15 / 500 hours
Source C / 100 / 1 hours

So in this case, even though Source B referred the lowest number of users, I could infer that the ads were much more targeted and effective, and that Source B traffic is earning me the most money.

Knowing amount of traffic itself would be somewhat useful in seeing if I'm just wasting a shitload of bandwidth and not getting enough conversions to justify it. But this would just be a bonus, the #1 thing I want to know is total playing time per traffic source.
 
Status
Not open for further replies.