Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register
  • We just completed a significant update, but we still have some fixes and adjustments to make, so please bear with us for the time being. Cheers!

Randomized Referral!

K-MTG

Sunshade Captain of TMC
Oct 24, 2015
4,815
3,437
Irvine, CA
Please do NOT submit your referral link more than ONCE. It is a pain to find your duplicate link and it makes the system unfair.

Currently at 281 submitted links
 
  • Like
Reactions: Tico

javawolfpack

Member
Jul 5, 2016
333
166
Chico, CA USA
Have you considered keeping track of the number of times a given referral is copied and doing some kind of weighted randomization? Nothing is truly random on a computer; however, you can weight the ones people haven't copied yet heavier so they are more likely to be displayed. Gives a statistical advantage to new links over ones people have copied numerous times.

It sounds like limited web experience... but this would require some JS front-end to let you know when a user copies the provided random link. Likely some callback methods as well. And some way to keep track of the links, number of times they are copied, etc... this would be the data needed to do a random weighted selection.
 

K-MTG

Sunshade Captain of TMC
Oct 24, 2015
4,815
3,437
Irvine, CA
Have you considered keeping track of the number of times a given referral is copied and doing some kind of weighted randomization? Nothing is truly random on a computer; however, you can weight the ones people haven't copied yet heavier so they are more likely to be displayed. Gives a statistical advantage to new links over ones people have copied numerous times.

It sounds like limited web experience... but this would require some JS front-end to let you know when a user copies the provided random link. Likely some callback methods as well. And some way to keep track of the links, number of times they are copied, etc... this would be the data needed to do a random weighted selection.

Appreciate the input, but I don't have the web skills to do that, I just copied and pasted code to create this
 

murphyS90D

Member
Jul 2, 2016
628
447
Horsham, PA
My link has been there since the beginning. The only referral I have ever gotten was one I sent to someone that I know. I know that because he sent me pictures after he received his car.
 

Tucker48

Member
Jun 30, 2016
51
41
Ohio
Popped mine in there--hoping this is still working :) I didn't ever think I'd get a single referral but a friend ordered and now I'm super greedy for a duffel bag or... gulp... a JACKET!
 

K-MTG

Sunshade Captain of TMC
Oct 24, 2015
4,815
3,437
Irvine, CA
Hey,

thank's for the website.

I used a shortened link (Referral | Tesla) is that okay ? It's to track how many clicks I get. If not ok I will repost it using my original link.

I made the referral system to only accept the ts.la domain as I was getting lots of spam links that I had to manually delete. Any way to let these Google short links work and prevent spam at the same time? Thanks
 

javawolfpack

Member
Jul 5, 2016
333
166
Chico, CA USA
I made the referral system to only accept the ts.la domain as I was getting lots of spam links that I had to manually delete. Any way to let these Google short links work and prevent spam at the same time? Thanks

You basically have to follow the link and see if it resolves to a ts.la link. It's possible to do this in code; however, not super trivial.
 

K-MTG

Sunshade Captain of TMC
Oct 24, 2015
4,815
3,437
Irvine, CA
Here you go. Works with both goo.gl and ts.la links:

Code:
<?php

$link="http://goo.gl/w2Zkcu";

if (strpos(strip_tags(file_get_contents($link)),"Tesla Referral Program")!==false) echo "good referral link";
else echo "bad referral link";

?>

Appreciate it, I will try to get it working this weekend
 

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top