Thread: Affiliate link

    #1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171

    Affiliate link


    Hi;

    I want to generate links for affiliates so they can advertise it and I can track who has send whom.

    I thought I make links like this:

    http://www.site.com/34

    Which works fine for me. I just create a session and in case this member registers I store the affiliate id as well.

    My question is, is this link gonna be picked up by Google? I don't want Google to find http://www.site.com/34 because that obviously causes problems.

    What is the right approach?

    Thank you

    Edit:

    Maybe I can create the session and then do a 301 redirect to home page?
    Last edited by English Breakfast Tea; January 30th, 2014 at 02:54 AM.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Location
    Romania
    Posts
    16
    Rep Power
    0
    You could check referrer , only those you don't want. If comes from google redirect to index page ( as example ) else do what have to do.
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171
    Originally Posted by RGerculy
    You could check referrer , only those you don't want. If comes from google redirect to index page ( as example ) else do what have to do.
    I think the referre could be anyone from anywhere. I give them link and they spread it on Facebook and other social media websites.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Location
    Romania
    Posts
    16
    Rep Power
    0
    That's right, but I'm talking about HTTP_REFERER .
    Please check this thread :
    Code:
    https://forums.digitalpoint.com/threads/referrer-check-anti-leech.101263/
  8. #5
  9. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171
    Originally Posted by RGerculy
    That's right, but I'm talking about HTTP_REFERER .
    Please check this thread :
    Code:
    https://forums.digitalpoint.com/threads/referrer-check-anti-leech.101263/
    Are you sure HTTP_REFERER is reliable?
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Location
    Romania
    Posts
    16
    Rep Power
    0
    Unfortunately, not 100% but it could work.
  12. #7
  13. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171
    I am not sure if we are on the same page or not. I am on page 4. What page are you on?

    I know how to do this I just don't want the page that creates the session to be picked up by Google, you know?

    Thanks
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    303
    Rep Power
    17
    <meta Name="robots" Content="noindex, Follow">
  16. #9
  17. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171
    Originally Posted by dabomb_gent
    <meta Name="robots" Content="noindex, Follow">
    I think 301 would do it since it's is permanent.
  18. #10
  19. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,095
    Rep Power
    1990
    One more thing to think about...

    What happens if an affiliate sends a prospect to an internal page on your site? Or are affiliates only, and will ever only be, sending traffic to your home page? If you want to look at some sort of deeper level linking (for say a specific offer, town, promotion, etc) then you'll need to look at doing it a slightly different way.

    One way that a lot of platforms do it is to have a recording URL that does all of the affiliate recording work and redirects the user to the page that they're looking for. How that's implemented varies greatly depending on how much has to be tracked, the system itself, and who's actually done the programming work for it.

    Either way, a 301 redirect to the requested page is the best way to tell the SE bots not to index each affiliates page. Then there's no need for any meta tags or any other tags/formats/functions.
  20. #11
  21. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171
    Originally Posted by Catacaustic
    One more thing to think about...

    What happens if an affiliate sends a prospect to an internal page on your site? Or are affiliates only, and will ever only be, sending traffic to your home page? If you want to look at some sort of deeper level linking (for say a specific offer, town, promotion, etc) then you'll need to look at doing it a slightly different way.

    One way that a lot of platforms do it is to have a recording URL that does all of the affiliate recording work and redirects the user to the page that they're looking for. How that's implemented varies greatly depending on how much has to be tracked, the system itself, and who's actually done the programming work for it.

    Either way, a 301 redirect to the requested page is the best way to tell the SE bots not to index each affiliates page. Then there's no need for any meta tags or any other tags/formats/functions.
    Hi;

    I'm not that big of a company. What do you think about this?
    PHP Code:
    class Aff extends MY_Controller {
        public function 
    set($id=NULL)
            {
                
                if(!
    is_numeric($id))
                    {
                        
    redirect('hell''location'301);
                    }    
                else
                    {
                        
    $query $this->db->get_where('aff', array('id' => $id));
                        if(
    $query->num_rows() != 1)
                            {
                                
    redirect('hell''location'301);
                            }
                        else
                            {
                                
    $newdata = array('aff'  => $id);
                                
    $this->session->set_userdata('LData'$newdata);
                                
                                
    redirect(base_url(), 'location'301);
                            }    
                    }    
            }

  22. #12
  23. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,095
    Rep Power
    1990
    Originally Posted by English Breakfast Tea
    I'm not that big of a company.
    Yes, but they don't have to know that. The bigger you seem, the more notice people will take, so fake it until you make it.

    As far as the code, there's only two things that I'd change.

    First, if there's no affiliate ID, or an invalid affiliate ID, don't redirect to your "hell" page... Redirect to the page that the user has requested, and don't record an affiliate ID. Remember - if your affiliate can't get it right it's not your fault, so don't punish the user for the affiliates mistakes and show them what they expect to see.

    Second, I'd allow another attribute to be passed in the the URL to visit on your site. Again, this is for deep linking which will help conversions by showing users exactly what they need, and the more conversions the better for you and your affiliates. Of course you'll have to check and sanitise the URL to ensure that it's part of your site, but that's a pretty trivial thing to do.

IMN logo majestic logo threadwatch logo seochat tools logo