WordPress.org

Ready to get started?Download WordPress

Forums

Adding to the links (3 posts)

  1. itsonlybarney
    Member
    Posted 7 years ago #

    I want to attach a url to the start of all my links inside both a post and the Blogroll. I have a tracking program so that I can track where my visitors go and what links they follow away from my site. But for me to do that I have to always add the URL to the beginning of the link I want to add manually, and I want to know if it is possible to have this happen when I type the original link in automatically.

    I don't want it added to things that link back to my site though.

  2. Chris_K
    Member
    Posted 7 years ago #

    Nothing leaps to mind... you didn't mention the tracking program you're using. Did you search the forums for that name to see if anyone else has posted about it and maybe got a solution?

  3. itsonlybarney
    Member
    Posted 7 years ago #

    I'm using the BBClone statistics program on my site.

    I've created a little page on my site where I add a variable on the end of the url and then it redirects to that URL.

    This is the code in that file that I want to add at the start of each URL

    <?php
    $addy = $_GET[url];

    //------ Counter -----------------------------------
    $page_name = "Redirect :: " . $addy;
    define("_BBC_PAGE_NAME", $page_name);
    define("_BBCLONE_DIR", "bbclone/");
    define("COUNTER", _BBCLONE_DIR."mark_page.php");
    if (is_readable(COUNTER)) include_once(COUNTER);

    header("Location: $addy");
    ?>

    Basically I want to have it set so that every URL I link to has the address of the above file added at the start of it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.