logging hyperlink clicks

Doug Easterbrook doug at artsman.com
Thu Nov 3 15:25:23 UTC 2022

hey Rob.

you are describing basically what tinyurl will do for you for a fee.  https://tinyurl.com/app/howit <https://tinyurl.com/app/howit>

effectively, you’ve be making something like tinyulr there the URL to the outside document is NOT actually the link to the outside document.    it is a link back to your web site that:
1) records the click
2) does a redirect to the page you want them to.

eg,  suppose you want. the URL to go to omnis.net <http://omnis.net/>

you make a URL to.  robmostyn.com/wyfwhlywe <http://robmostyn.com/wyfwhlywe>
or robmostyn.com <http://robmostyn.com/>?doc=wyfwhlywe <http://robmostyn.com/wyfwhlywe>

where wyfwhlywe <http://robmostyn.com/wyfwhlywe> is a path call on your server.
or, in the second example, ‘doc' is a path that your server will respond to.

in either case (depending which you implement)

you now have the ability to track somebody clicked the link because the traffic first went through your server


you can issue a redirect to the right URL after you look it up.

you’d make a web page that has the redirect in it and issue a web response code of 301 or 302 instead of a response code of 200 

heres a web page that talks about a ‘redirect’ in a web page
https://blog.hubspot.com/website/html-redirect <https://blog.hubspot.com/website/html-redirect>

there are likely a number of more efficient ways to do it, but the gist of this is

1) use a URL that goes back to your web site with a tag on it to tell you which web site you really want the user to go to

2) when you get that hit, count the access to it

3) make a web page that your return to the user that has a redirect in it to where you want it to really go to.

4) and you may need to change the return code from a 200 to a 302

Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
Phone (403) 650-1978

> On Nov 3, 2022, at 4:39 AM, Rob Mostyn <mostyn at platformis.net> wrote:
> Dear $Listers,
> This is a problem I’ve thought about before but never actually implemented.  Now I really want to implement it but I’m not sure how to do it.
> It is an ultra thin application.
> Omnis returns HTML to a browser to render.
> On this page I want to present a number of links to external resources (other websites, documents on the web etc).
> Ok… that is easy by providing hyperlinks on the web page to these other resources.
> But I want to log what links gave been clicked.  Google does this on its search results.
> Clicking on the link calls Omnis.
> A parameter to the call denotes which link.
> Omnis is invoked and the link can be logged.
> But how do I return to the browser with “execute this hyperlink on a new tab/window”, leaving the previously despatched HTML as is?
> Or I could return the previously generated HTML but how do I invoke the browser to follow the link?
> Has anyone else tried to do this?  I know there is a way to tell  a browser to redirect but I don’t know how this works.
> Help!
> Rob Mostyn
> +44 (0)20 3233 0044
> As Carl Sagan once said:
> One of the great commandments of science is, "Mistrust arguments from authority." ... Too many such arguments have proved too painfully wrong. Authorities must prove their contentions like everybody else.
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 

More information about the omnisdev-en mailing list