• Back to Questions
    QHow do I set up LinkTracker file references ?

    LinkTracker Count:

    • It's best to place this stack on a page by itself, as it normally won't be seen by anyone but you.
      In the Page Inspector > General tab, uncheck "Show in menu".
    • A single LinkTracker Count stack can handle unlimited links within a website, so you only need to set up one count page.
    • This page will automatically be assigned a .php extension so that php scripts can function.
    • This page will only run on a Published page & you will always see a php error in Preview.
    • The "Path to DB folder" is the folder related to this count page.  Folder naming conventions are as follows (for RW6+):  For a page that is the home page or other pages that are located at the root w/o a folder specified (ie. the same level as the home page), then the folder name will be named by combining the page name with a suffix "_files", i.e. for the home page, "index_files".  If you drop a page into another one creating a subfolder w/ a folder specified or specify a folder in General Settings, then the folder name would be "files".  Let's assume we named this page "count.php", it's not the home page, but it is in the root. So, the path to DB folder would be "count_files".
    • "This Page URL" is asking for the absolute url address for this page.  You should be able to figure this out from your folder structure, but you can always publish this page and then use an FTP program to find the page & figure out the path.
      Once you get the DB folder & Absolute URL entered correctly, go ahead and Publish this page.
    • You will need to change the permissions of the actual database file so that it can be written to.
      Using your favorite FTP program, find the count page folder and inside of it will be a folder named "link tracker".  Do a "Get Info" (or however your FTP program edits permissions) on the file inside called "linktracker.db".  Change the unix permissions to 644, i.e. read and write for owner & read only for group & everyone else.
    • If you look on the published count page, you should see the tracking display titles "# / Target URL / Clicks" showing. There's no click information yet, so nothing else will show until a LinkTracker Link is set up and clicked.
    • Since the Tracking Display is really what we're interested in, I've provided the "linktrackercount" snippet which can be double-clicked to install it.  Then just find it in the Snippets panel and drag and drop it into Page Inspector > Header tab > CSS tab > Custom CSS.  The css code will try and remove header and navigation elements, so you can see the display w/o a lot of vertical scrolling.
    • WARNING: Anytime this page is published, the count clicks and date stamp will reset.
      Anytime you are doing work on the website and Publishing something - Be sure to note & record the clicks somewhere so that information is not lost !

    LinkTracker Link:

    • The first control is the "Link" button.  This utilizes Stack's built-in linking panel so simply choose the page/file/resource you wish to link to.  If you choose an exterior website or an absolute url, then be sure to enable the "Link is Absolute URL" checkbox.
    • The "Path to DB folder" control is asking for the relative path from the link page to the count page folder.  FYI - this is the same page that is referenced in LinkTracker Count, but will have a path to it as well.  LInkTracker Count actually creates this folder automatically, so reference the LinkTracker Count section and then come back here.
      Once you've set up the count page, copy the folder name here and add any path as necessary.
      If you need to go up a folder level then use "../"
    • Once you have the paths set up you can publish the link page(s) and click the links.  If you look in the published count page, you should now see click data being displayed along w/ a date stamp.
    • If the click data is not being displayed, then it's most likely one of the folder names or paths are incorrect.