This Forum has been retired.

Announcement

Please visit the new Mint Forum.

#1 2006-02-09 8:37:00 pm

joshpeek
Member

Outclicks - undefined results

I've heard about "undefined" results in my Referrers but I can't fix those. I'm getting "undefined" results in my Outclicks. It's coming from my site so I'm the problem. What type of links cause this?

Offline

 

#2 2006-02-17 4:06:11 am

janisto
New member

Re: Outclicks - undefined results

quick fix for undefined caused by images.

'pepper/andrewsutherland/outclicks/script.php' at line 77.

replace

Code:

        path += "?outclick="+esc(elem.href);

to

Code:

        if(elem.nodeName == 'IMG') {
            path += "?outclick="+esc(elem.parentNode.href);
        } else {
            path += "?outclick="+esc(elem.href);
        }

That should fix all.
IE and Firefox are now showing proper urls.

This is for Outclicks 1.14

-janisto

Offline

 

#3 2006-02-17 2:42:54 pm

Timmargh
Member

Re: Outclicks - undefined results

Excellent - cheers.

Offline

 

#4 2006-02-20 8:47:55 am

thomasstache
Member

Re: Outclicks - undefined results

Are you guys referring to records with "undefined" as the title? With the above fix I still have completely empty, i.e. "", outclicks. Anyone else seeing this?

Offline

 

#5 2006-03-31 4:50:43 am

bzikofski
Member

Re: Outclicks - undefined results

i applied the fix and i'm still getting undefined outclicks
(i have the latest outclicks - 1.14)

if there's another fix let me know


cheers

Offline

 

#6 2006-04-01 4:54:34 pm

dbedingfield
New member

Re: Outclicks - undefined results

I had discovered the same issue; I applied the fix mentioned above and it solved the issue.

Offline

 

#7 2006-04-01 5:36:25 pm

craiglaw
New member

Re: Outclicks - undefined results

I just applied the patch and went to the page where i noticed the 'undefined' - clicked around, seems to be ok now.

Ill post if this changes

CL

Offline

 

#8 2006-04-04 5:53:31 am

bzikofski
Member

Re: Outclicks - undefined results

the "undefined" outclicks are now the majority of my outclicks..
i don't know what's wrong..

i noticed it's happening on two pages:
on one of those i have two links relating to the same page like these:

Code:

<a href="/section/#subsection1">link</a>

and on the other one i have few links that open in new window, i'm using javascript there:

Code:

<a href="http://example.com" onclick="window.open(this.href); return false;"><link</a>

but there are links like these on other pages too, and there were no undefined...

i'm not sure what might be wrong. if anyone has an idea let me know please
waiting for 1.15

cheers

Offline

 

#9 2006-04-04 5:57:48 am

janisto
New member

Re: Outclicks - undefined results

Hi,
can you post the urls for those pages.

-janisto

Offline

 

#10 2006-04-04 10:27:13 am

craiglaw
New member

Re: Outclicks - undefined results

Hmm - I'm still getting an 'undefined' after applying the patch.

Only seems to come from one page - I'm going to investigate further and see which link is triggering this.

CL

Offline

 

#11 2006-04-06 6:35:56 am

bzikofski
Member

Re: Outclicks - undefined results

janisto wrote:

Hi,
can you post the urls for those pages.

-janisto

yes i can:
http://www.argostranslations.com/employment/translator/
http://www.argostranslations.com/partners/

i also noticed an undefined here:
http://www.argostranslations.com/articles/links/



thanks

Offline

 

#12 2006-04-06 3:42:24 pm

The Linguist
Member

Re: Outclicks - undefined results

janisto wrote:

That should fix all.
IE and Firefox are now showing proper urls.

This is for Outclicks 1.14

-janisto

Thank you, that worked perfectly.

Offline

 

#13 2006-04-25 6:08:17 am

bzikofski
Member

Re: Outclicks - undefined results

bzikofski wrote:

janisto wrote:

Hi,
can you post the urls for those pages.

-janisto

yes i can:
http://www.argostranslations.com/employment/translator/
http://www.argostranslations.com/partners/

i also noticed an undefined here:
http://www.argostranslations.com/articles/links/

thanks

any ideas what could be wrong? are those pages okay?
i'm getting undefined all the time..

cheers

Offline

 

#14 2006-04-25 6:43:06 am

janisto
New member

Re: Outclicks - undefined results

Hi,
I think window.open is the reason.

Try removing this kind of links:
<a href='http://www.lisa.org/' onclick='window.open(this.href); return false;'>LISA</a>

If you use window.open just to validate your site strict, try using something like this instead:
http://pure-essence.net/archives/2006/0 … lexternal/

or use just target="_blank".

-janisto

Offline

 

#15 2006-04-25 6:54:18 am

bzikofski
Member

Re: Outclicks - undefined results

thanks janisto

yeah that might be the window.open although i receive normal outclicks here for the same links and they are "defined" - that is i can see what the outclick was..

yeah that was my purpose for validation.. well i might change it to target _blank

or... wait for outclicks update ;)

cheers

Offline

 

#16 2006-07-20 3:29:53 pm

markgarrigan
New member

Re: Outclicks - undefined results

I just did a fresh install of Mint 1.29, outclicks, and much more pepper. Everything is working fine except one external link was showing up as undefined in outclicks.

I tried the fix that janisto suggested... although it didn't work because it is looking for the img tag. The link which was causing my undefined had a span tag in it.

Code:

<a href="http://worknet.wisconsin.gov/worknet/"><span class="caps">WORK</span>net</a>

So i just changed his fix to this

Code:

if(elem.nodeName == 'SPAN') {
            path += "?outclick="+esc(elem.parentNode.href);
        } else {
            path += "?outclick="+esc(elem.href);
        }

and it works now.

The two links shown here are the same link. One before the fix and one after.

http://www.manitowocjobcenter.org/images/outclicks.gif

So obviously the code needs something to allow for tags that are within the <a> element.

Offline

 

#17 2007-01-04 12:18:17 am

buddha1822
New member

Re: Outclicks - undefined results

Yea... I was having this undefined problem too...

Is there a way to write a regular expression that looks for anything like em, strong, b, i, span, img and does this, or even a way to always find the node that contains the href?

Offline

 

#18 2007-01-06 11:38:12 pm

Chris Boulton
New member

Re: Outclicks - undefined results

A better fix (for the people above) would be:

Code:

        if(elem.parentNode && elem.parentNode.href) {
            path += "?outclick="+esc(elem.parentNode.href);
        } else {
            path += "?outclick="+esc(elem.href);
        }

Chris Boulton - MyBB - SurfiOnline

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson