We help IT Professionals succeed at work.

Unique Link Tracking

Medium Priority
243 Views
Last Modified: 2014-06-29
I have a team of lets say 10 people all of which are sales reps, there job is to get people to click on a link and sign up for a service. I'm trying to find out the best way to track this, I'm looking for a way to give each rep a unique URL link and all links go to the same page. So part one is how do i set that up, but the next hurdle is how do I retrieve that unique number so i know you signed up. I am using wordpress so if there is a plugin that always make life easier :) thank you for your responses.
Comment
Watch Question

Director, Information Systems
CERTIFIED EXPERT
Commented:
Use a query string in the url with a unique identifier for each salesperson:

   www.mysite.com/product?s=123

where s=123 means salesperson 123 is the referrer.
CERTIFIED EXPERT

Commented:
Jason C. LevineDon't talk to me.
CERTIFIED EXPERT

Commented:
For general use, the appending of a query string will probably be fine.  For Wordpress-specific use, check out the Affiliate plugin:

http://wordpress.org/extend/plugins/affiliates/

Author

Commented:
Okay so lets say we use the query string method, example: www.mysite.com/signup?s=01
and i have assigned 01 to john doe. There is a referred by text box on the page so the goal is to auto fill that will John Doe. And if no string was added to the url it just puts in "Other" whats this javascript look like. Thank you again guys.
Paul MacDonaldDirector, Information Systems
CERTIFIED EXPERT

Commented:
You're working in PHP, right?  I'd write the logic in PHP.  Unfortunately, I don't know PHP, so my usefulness ended with my first post.

Author

Commented:
This is how i get it
if( isset($_GET["s"]) ){ echo $_GET["s"]; }

Open in new window


I'm gonna have to create a table with ids and names
$con = mysql_connect('127.0.0.1', 'root', '');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("dbname", $con);

$sql="SELECT * FROM salesreps WHERE id = '".$s."'";

$result = mysql_query($sql);

mysql_close($con);

Open in new window



This is how i set it
document.getElementById('txtreferredby').value='$sql'

Open in new window


Sorry im just trying to work this out myself heres what i have but i think it needs to be cleaned up? thanks for the help!

Author

Commented:
Thank you paulmacd, youll be rewarded :)
Paul MacDonaldDirector, Information Systems
CERTIFIED EXPERT

Commented:
Yes, sorry, my first post contained a link for working with query strings in PHP, so I didn't think to follow up with that.  

You will need to store the list of salespeople somewhere.  A database is ideal because it's easily updated.  If you can't have (or don't want) a database, consider a text file or something else external to the page itself you can update easily.  Having the list outside a particular page lets you use the list on more than one page, should the need arise.  Just something to consider.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.