Author Topic: Automatic Forwarding From Tracking Links  (Read 6011 times)

RowdyRhodes

  • Posts: 48
    • View Profile
    • http://www.fwointl.com/
Automatic Forwarding From Tracking Links
« on: February 24, 2008, 08:32:29 am »
Hi Dean,

I hope all is well. It's been a while since I've stopped by here. Last December actually, so Happy belated New Year!

I have an interesting problem I would like to resolve:

As everyone knows when a tracking link is created and inserted into an email that is sent to their list the users sees a link such as :

http://fwointl.com/LMPmail/link.php?id=fwo

Here's my problem: I'm finding that hundreds of sites are using the links from my newsletter on their pages to direct their users to items that I have written about without their users realizing they are going through my system.

As an example let's says I wrote an info piece in my newsletter about Writers Digest and wanted to track the number of hits I would write the article and then add a link like :

http://fwointl.com/LMPmail/link.php?id=wd

Other web sites adding this link to their pages does nothing for me other than use up my system resources. What I would like to do is still have all those links functional and if they want to use them, then fine by me, hwoever I want to be able to customize the redirection page which currently only displays "Please Click Here if you are not forwarded automatically." to something more beneficial and appropriate for my site.

I'd like to change:

- the font on the above text
- the time delay on the forward
- the page content to include background, graphics and the text reflecting my site.

Of course I can't make it to be too much "stuff" because the vast majority of the people using the links are my newletter members and they know my site, however I would like to be able to customize the forwarding page so that users coming in from these other sites using my links are made aware and I can promote my site to them.

Is this possible? If so, what file(s) and where do I find them? I've looked through the software but can't seem to locate what I need so I am assuming that the above is built into the software and is an internal page. I don't know php programming so I'm hoping that this will be relatively painless to modify {smile}. In actual fact I'm hoping that the redirect page is an HTML template somewhere (like the signup HTML) and I'm overlooking it somehow in my setup or configuration areas.

Take care,
Rowdy Rhodes
Site Manager
Freelance Writing Organization - Int'l.
- A Writer's Digest Top 101 Site
- #1 Writing Resource Site - The Writer
http://www.fwointl.com/
Publishers of:
Inkwell Newswatch (IN) -- Writer's Ezine
http://www.fwointl.com/in.html and
Writers Site News! Weekly Emailed Newsletter
Freelance Writing Organization - Int'l
http://www.fwointl.com

Free site hosting thousands of writing resources and links. 40+ genres, writers' funding, job listings, education, news, submissions, and more. Publishers of Inkwell Newswatch and Writers Site News. Professional writing resources for writers, authors, editors and publishers.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Automatic Forwarding From Tracking Links
« Reply #1 on: February 26, 2008, 06:03:33 am »
Hi Rowdy,

The code is in link.php:
Code: [Select]
 // show the redirect page
  echo "<html>
<head>
<title>Linking to $title... Please stand by...</title>
<noscript>
<meta http-equiv=\"refresh\" content=\"3; URL=$http\">
</noscript>
<script language=\"JavaScript\"><!--
var sTargetURL = \"$http\";
function doRedirect(){
    setTimeout( \"window.location.href = sTargetURL\", 2*1000 );
}
//--></script>

<script language=\"JavaScript\"><!--
function doRedirect(){
    window.location.replace(sTargetURL);
}
//--></script>
</head>
<body>
<br>
<div align=center style=\"font: 12pt san-serif\">Please <a href=\"$http\">Click Here</a> if you are not forwarded automatically.</div>
<script language=\"JavaScript\"><!--
doRedirect();
//--></script>
</body>
</html>";


If you want to paste straight HTML and not have to worry about escaping quotes in the PHP echo() function.  What you do is exit from PHP with the closing ?> tag, and then reopen it after the HTML with <?php.  Basically, replace the above with this:
Code: [Select]
 // show the redirect page
?>
<html>
<head>
<title>Linking to
<?php echo $title; ?>
... Please stand by...</title>
<noscript>
<meta http-equiv="refresh" content="3; URL=
<?php echo $http; ?>
">
</noscript>
<script language="JavaScript"><!--
var sTargetURL = "
<?php echo $http; ?>
";
function doRedirect(){
    setTimeout( "window.location.href = sTargetURL", 2*1000 );
}
//--></script>

<script language="JavaScript"><!--
function doRedirect(){
    window.location.replace(sTargetURL);
}
//--></script>
</head>
<body>
<br>
<div align=center style="font: 12pt san-serif">Please <a href="
<?php echo $http; ?>
">Click Here</a> if you are not forwarded automatically.</div>
<script language="JavaScript"><!--
doRedirect();
//--></script>
</body>
</html>
<?php

Let me know if I can be of further assistance on this.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

RowdyRhodes

  • Posts: 48
    • View Profile
    • http://www.fwointl.com/
Automatic Forwarding From Tracking Links
« Reply #2 on: March 01, 2008, 08:59:31 am »
Quote from: "DW"
The code is in link.php


Thanks Dean! I gave give it a try but can't seem to slow down the redirect page.

I even set the time out to:

setTimeout( "window.location.href = sTargetURL", 100*10000 );

and it still does not give enough time for proper display. I'd like it to sit there for at least 5 seconds so that the line I added can be used if needed:

<div align=center style="font: 12pt san-serif">This writing resource brought to you by the Freelance Writing Organization - Int'l <a href="<?php echo $http;www.fwointl.com ?>">www.fwointl.com</a>.</div>

It flips by so fast I can't even test if the above works. What's the math on this and am I changing it in the right place to slow it down?

Also, is the code global redirect? i.e. If I have more than one list being used this will be the default page for all of them? Currently this is not a problem as I only maintain one list. I'd just like to know for future reference.

One last thing, when upgrades happen does link.php get over written? If so I'll need to remember that as well.

Thanks again,
Rowdy
Freelance Writing Organization - Int'l
http://www.fwointl.com

Free site hosting thousands of writing resources and links. 40+ genres, writers' funding, job listings, education, news, submissions, and more. Publishers of Inkwell Newswatch and Writers Site News. Professional writing resources for writers, authors, editors and publishers.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Automatic Forwarding From Tracking Links
« Reply #3 on: March 02, 2008, 09:51:15 am »
Hi Rowdy,

It looks like I made a mistake in link.php!
Code: [Select]
<script language="JavaScript"><!--
var sTargetURL = "
<?php echo $http; ?>
";
function doRedirect(){
    setTimeout( "window.location.href = sTargetURL", 2*1000 );
}
//--></script>

<script language="JavaScript"><!--
function doRedirect(){
    window.location.replace(sTargetURL);
}
//--></script>

Notice two functions are using the same name, so only the second one, the one without the delay, would end up being available.  Remove the second one entirely and it will use the first one with the delay you want.
Quote
Also, is the code global redirect? i.e. If I have more than one list being used this will be the default page for all of them?

Yes, it is global.  The link tracking feature does not currently track which list the click came from.
Quote
When upgrades happen does link.php get over written? If so I'll need to remember that as well.

Yes, and the redirect process may change so you might need to contact me for a new method of re-instating your customizations.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

RowdyRhodes

  • Posts: 48
    • View Profile
    • http://www.fwointl.com/
Automatic Forwarding From Tracking Links
« Reply #4 on: March 02, 2008, 05:44:22 pm »
Quote from: "DW"
Hi Rowdy,

It looks like I made a mistake in link.php!


That's ok. Glad I could be a part of helping find another. Like I said it's been a while {smile}. I'm lost though when it comes to php programming ... even the basics of making links go where I want them to go!

I took out the second function and the timer works great!

The following is what I can't figure out:

Code: [Select]
<div align=center style="font: 12pt san-serif">This writing resource brought to you by the Freelance Writing Organization - Int'l. <a href="
<?php echo $http; ?>
">www.fwointl.com</a></div>

Right now the above will take the user (if they click the link) to the page that they are being redirected to. What I would like is that the above link take them to http://www.fwointl.com/

I tinkered around with it but can't seem to get the right combination to make it work. i.e. The timer re-directs, the default "click here" command will still take them to the redirect page if the timer doesn't, however if they want to go to the main site I'd like them to just be able to click on the above and it goes there instead. Can you write the line? I'm stuck. When I do it it either doesn't go where I want it to go or the timer get stuck and the page doesn't go at all.

The full code (in case you want to look) is:

Code: [Select]
 // show the redirect page
?>
<html>
<head>
<title>Linking to
<?php echo $title; ?>
... Please stand by...</title>
<noscript>
<meta http-equiv="refresh" content="3; URL=
<?php echo $http; ?>
">
</noscript>
<script language="JavaScript"><!--
var sTargetURL = "
<?php echo $http; ?>
";
function doRedirect(){
    setTimeout( "window.location.href = sTargetURL", 7*2000 );
}
//--></script>

</head>
<body>
<br>
<div align=center style="font: 12pt san-serif">Please <a href="
<?php echo $http; ?>
">Click Here</a> if you are not forwarded automatically.</div>
<br>
<div align=center style="font: 12pt san-serif">This writing resource brought to you by the Freelance Writing Organization - Int'l. <a href="
<?php echo $http; ?>
">www.fwointl.com</a></div>
<script language="JavaScript"><!--
doRedirect();
//--></script>
</body>
</html>
<?php }}


Thanks
Rowdy
Freelance Writing Organization - Int'l
http://www.fwointl.com

Free site hosting thousands of writing resources and links. 40+ genres, writers' funding, job listings, education, news, submissions, and more. Publishers of Inkwell Newswatch and Writers Site News. Professional writing resources for writers, authors, editors and publishers.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Automatic Forwarding From Tracking Links
« Reply #5 on: March 03, 2008, 01:53:08 pm »
Hi Rowdy,

This should be a simple matter of changing:
Code: [Select]
<a href="
<?php echo $http; ?>
">www.fwointl.com</a>
to
Code: [Select]
<a href="http://www.fwointl.com">www.fwointl.com</a>

The <?php echo $http; ?> part is to output the redirect URL from LMP, and you already have that where it's needed.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

RowdyRhodes

  • Posts: 48
    • View Profile
    • http://www.fwointl.com/
Automatic Forwarding From Tracking Links
« Reply #6 on: March 03, 2008, 04:12:56 pm »
Thanks Dean,

I had tried that before, thinking straight HTML and it failed. Tried it again and now it works. Must have been an I/O (idiotic operator) error {smile}.

Thanks again for your help. As always you manage to provide a fantastic product with great support, something companies the likes of Microsoft should pay more attention to with their products.

Bye for now,
Rowdy
Freelance Writing Organization - Int'l
http://www.fwointl.com

Free site hosting thousands of writing resources and links. 40+ genres, writers' funding, job listings, education, news, submissions, and more. Publishers of Inkwell Newswatch and Writers Site News. Professional writing resources for writers, authors, editors and publishers.