You'll need to be more clear about what you are trying to do. Are you trying to make it so that when someone is on page #1100 and they click a link that brings them to page #1234, you want it so that page #1234 can say, "Ahh, I see that you just linked in from page #1100".
Is that right?
Or are you talking about transferring information that was entered in a Web Form from page to page so that, for example, when someone enters their name and email on page 1 and then they link to page 2, and then to page 3 and then to page 4, that page will be able to know the name and email address that was entered back on page 1?
As for adding code to 1300 pages, there are a few ways to handle this if you have to. I believe that you can tell Apache to insert a certain header or footer onto every page. Alternatively, there are global search and replace tools that will add your code to 1300 different text files.