Spreadfirefox affiliates: Difference between revisions
No edit summary |
Paulbooker (talk | contribs) |
||
Line 60: | Line 60: | ||
The idea is that logmaker.php tells us how much traffic went in, so we can set expectations for run.pl and the tally script. | The idea is that logmaker.php tells us how much traffic went in, so we can set expectations for run.pl and the tally script. | ||
Another way to test the tally scripts might be to create a test-tally.sql which could have expected output after the tally code runs. | Another way to test the tally scripts might be to create a test-tally.sql which could have expected output after the tally code runs. | ||
Revision as of 14:08, 16 April 2009
Go to the Spread Firefox wiki home
Go to Spread Firefox Affiliates program wiki home
Background
The Spread Firefox Affiliates program contributes to many Firefox downloads by giving community members HTML buttons to place on their website. Website visitors click these buttons, which leads to a destination site (e.g. the Firefox download page).
The sfx_affiliates module implements the various tools needed by the Affiliates program.
Version 2
With milestone 3.0, the sfx_affiliates module has been substantially rewritten.
Goals
The rewrite was done to accomplish a few things...
- Cleanliness of code, comments, and structure this makes it easier to make changes in the future,
- Correctness, i.e. points are counted correctly, aggregate stats are correct, etc
- Testability, this is an awkward system to test because it is spread out over many sites.
- Archiving. Another big problem with v1 was that we were always deleting records, so if we had a problem longer than a month ago, the only way to get at those records would be to re-parse/tally the logs for that day/week/month
Features
Buttons
Stats & Points
Current affiliates lists
- Top 5
- Top 250
- Lists top 250 affiliates, sorted by the number of points each gained over the past 7 days.
- Top Movers
Content
OG Project page
http://spreadfirefox.com/affiliates
Testing
Stats
Testing affiliates stats tracking requires a special setup because of the architecture. Currently, the stage site is not very useful for testing affiliates button traffic stats.
logmaker.php is a script that can generate fake access logs to be used for testing affiliates traffic. Hit/download count can be configured. Optionally, affiliate user/button data can be pulled from a database, which can be used to populate the fake access logs. Hits/downloads/points per user will be chosen randomly. The script will output the amount of hits/downloads/points per user ID it generated.
Example procedure:
- Configure logmaker.php
- Hit count: 15,000
- Download count: 12,500
- Pull top 250 users from existing DB
- Pull all active buttons from existing DB
- Run logmaker.php, save output
- Run run.pl, save output
- Save current top 250 page (screenshots?)
- Run SFx cron (which will run tally scripts)
- Compare previous to current top 250 (since logmaker.php used only the top 250 users to generate logs, only the top 250 affiliates will be affected, and you can view all changes on this page)
The idea is that logmaker.php tells us how much traffic went in, so we can set expectations for run.pl and the tally script. Another way to test the tally scripts might be to create a test-tally.sql which could have expected output after the tally code runs.