Closed Bug 477638 Opened 15 years ago Closed 15 years ago

Affiliates Program download point counts aren't correct

Categories

(Websites Graveyard :: spreadfirefox.com, defect)

x86
All
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: drolnitzky, Assigned: abuchanan)

References

()

Details

(Whiteboard: affiliates)

Points don't seem to be counting correctly for the program.  We've had a few Affiliate members write in about this.  For example, username: norwichfootball; uid=248723.  

According to omniture, he's had ~110 clicks on the download button in January.  Granted, download clicks do not register as a point (they need to get the file), but I can't believe that more than 100 people have clicked on this guy's button and not gone through to completion.  So something definitely seems wrong with the data.

FYI, you can get to the omniture report in custom conversion > SFx affiliate ID.

As a point of reference, omniture says that there have been 214,275 download clicks so far in January.  Might be good to see what the totals are so far via sfx database to see if the numbers are relatively close

Also, of the weekly top 250 report (http://www.spreadfirefox.com/affiliates/top_250), the totals for a number of the affiliates is less than the weekly total.
@Alex

Do you want me to take this ?

Best, Paul
Severity: major → blocker
Target Milestone: --- → 3.0
I'll take a look at this bug in the morning .

Paul
@Alex

Let me know if you would like to delegate this task to me. 

Best, Paul
I'd be able to help investigate. I'm just starting out with Spreadfirefox, so David, Paul: any extra info would be appreciated.
Will probably ask questions after I look into it more.
I think Alex is working on the affiliates module, here is our skype conversation from Monday ..


oh yeah, btw, i saw your comment on the affiliates bug
02/03/2009 21:32
 
i'll handle fixing affiliates, just need you to wrap up your end
02/03/2009 21:32
 
thanks for the offer though
sorry, not sure yet why the point counts are stuck at 4000 on stage
Whiteboard: affiliates
I think the points were being counted correctly, and the number 4000 just happened to be a caveat of the logmaker.php script.  I've tweaked the log generator to provide more random numbers.

I've also tweaked the points tally function, as it was resetting a users last points change to 0 inappropriately.

As a consequence, I had to reset the affiliates_users table on stage, so the top fox spot will be blank until the next cron run tonight at midnight.

After that, the points should be up and running correctly.

r23726
> 
> As a consequence, I had to reset the affiliates_users table on stage, so the
> top fox spot will be blank until the next cron run tonight at midnight.

sorry, i meant to say that all this applies to stage only
looks like I forgot to commit something yesterday, so I'll have to do the same thing as yesterday, today.  

r23776 updates the log generator.

sorry for the setback
Will this mean we get to see it working on stage today?!
(In reply to comment #10)
> Will this mean we get to see it working on stage today?!

hopefully, tomorrow morning (or technically midnight)  we'll see things working, because this is when cron runs the affiliates counter
looks like the points totals are updating on stage now.  I think the mysterious points disappearance over the last weekend was my own doing...

...( I had a page on stage that cleared the affiliates_users table, it was probably being visited by a search indexer, which ran the PHP code, and therefore deleted all the points.  Don't worry, this was only a dev./stage thing, not possible on production)

So, what's left is testing and verification.  Here's my idea for this...

1) I've written a script that generates fake access logs for mozilla.com and download.mozilla.org (these are the logs we parse in production to find affiliates traffic)

2) I'll set up the test script to count how much affiliates traffic it generates (hits/downloads/points)

3) when the tally script counts up those points and updates the user records, I'll have it match those totals with #2 above.  When they match, we know everything in between is finding affiliates traffic appropriately
Great on the testing -- I heard from an affiliate today that his count was 43, but he wasn't showing up on the block.

Have we kept logs somewhere of all of this?  Pardon my ignorance :)
Hey Alex; would you mind posting instructions for those of us that can get to Khan?  I guess that's mostly me for right now, but maybe we can get someone else in webdev/IT to take a look at it too?  I remember oremj doing a great job with it during Download Day, and I think Ryan as well?
This bug has become stale, so I'll update briefly...

r24960 brings some pretty big changes to affiliates stats counting.  The db schema and counting code have been rewritten.  Unit tests for this are included under sfx_affiliates/tests/

We did end up getting some logs to test with, which proved the parse script is working.  r24960 focuses on the stat counting code, which is different from the parse script.

Since this is such an awkward system to test, QA has mentioned they'd like to defer testing to the devs (which I've done with unit/functional testing)

I'm going to resolved this, since there isn't anything else to do besides launch the new code.

If I missed something, sorry, let me know.

Thanks
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: Websites → Websites Graveyard
You need to log in before you can comment on or make changes to this bug.