Own page in outlinks

Hi, i lately started to use piwik and am really happy with it

only problem i have is that i got my own page in the outlinks from time to time, its strange, it looks like this:

<row>
<label>http://mypage.com</label>
<full_url>0</full_url>
<nb_visits>82</nb_visits>
<nb_uniq_visitors>82</nb_uniq_visitors>
<nb_hits>87</nb_hits>
<entry_nb_unique_visitor>3</entry_nb_unique_visitor>
<entry_nb_visits>3</entry_nb_visits>
<entry_nb_actions>3</entry_nb_actions>
<entry_sum_visit_length>30</entry_sum_visit_length>
<entry_bounce_count>3</entry_bounce_count>
<exit_nb_unique_visitor>3</exit_nb_unique_visitor>
<exit_nb_visits>3</exit_nb_visits>
<exit_bounce_count>3</exit_bounce_count>
<sum_time_spent>110</sum_time_spent>
<url>0</url>
<idsubdatatable>13</idsubdatatable>
</row>
−
<row>
<label> http://mypage...</label>
<full_url>http://mypage.com</full_url>
<nb_visits>36</nb_visits>
<nb_uniq_visitors>36</nb_uniq_visitors>
<nb_hits>36</nb_hits>
<exit_nb_unique_visitor>1</exit_nb_unique_visitor>
<exit_nb_visits>1</exit_nb_visits>
<exit_bounce_count>0</exit_bounce_count>
<sum_time_spent>40</sum_time_spent>
<url>http://mypage.com</url>
</row>
<row>
<label>http://MyPage.com</label>
<full_url>0</full_url>
<nb_visits>4</nb_visits>
<nb_uniq_visitors>4</nb_uniq_visitors>
<nb_hits>5</nb_hits>
<exit_nb_unique_visitor>1</exit_nb_unique_visitor>
<exit_nb_visits>1</exit_nb_visits>
<exit_bounce_count>0</exit_bounce_count>
<sum_time_spent>5</sum_time_spent>
<url>0</url>
<idsubdatatable>14</idsubdatatable>
</row>

one of the item has different cases, MyPage.com instead of mypage.com but that shouldnt matter and isnt the onlyproblem
what i dont understand is why there is myspace.com in there, has it something to do with the 0?

i dont really have an idea where to look in the code and would be happy if somebody had some hints

i read a bit through code and the DB

what i found is that the mypage.com is already in piwik_log_action with type = 2, i think this means it is outlink and that it is already
in the database so i have to check at the place data is inserted
not where it is read and viewed, any hints?

You may need to use piwik_hosts_alias to exclude intra-links. This is needed when visitors reach your site through multiple names (eg www.mypage.com and mypage.com), and/or you use a mixture of those names internally on your anchor elements.

i think thats it, i thought that is done at the site settings in the admin panel

shame that i didnt read http://piwik.org/docs/javascript-tracking/

thanks a lot for the help

ok, still doesnt work

but it is indeed going from www.mypage.com to mypage.com
and vice versa
i added

piwik_hosts_alias = [ "*.mypage.com", "mypage.com", "www.mypage.com"

no it looks like

...
piwik_action_name = '';

piwik_hosts_alias = [ “*.mypage.com”, “mypage.com”, “www.mypage.com


piwik_idsite = 1;
piwik_url = pkBaseURL + "piwik.php";
piwik_log(piwik_action_name, piwik_idsite, piwik_url);
</script>

...

but still it gets shown in outlinks

did i miss anything?

in the next version, outlinks on domains that you entered for your website in the admin, won’t be counted in Piwik. This was a limitation in existing version that we are fixing.
Also thanks for the report, it seems the outlinks wasn’t properly strtolowered, I will check that.

Also, like vipsoft suggest, the piwik_alias_hosts should work to not count links on other domains.

finally there is also http://dev.piwik.org/trac/ticket/579 that you mentionned

kwizzles: It should be sufficient to have:

piwik_hosts_alias = ['*.example.com'];

This only applies to new visits. It won’t correct older entries in your database.

matthieu: Yes, this is a behavioural difference on Safari. Other browers return a lowercase hostname. This is fixed in the new piwik.js.

[quote=vipsoft @ Mar 24 2009, 11:40 PM]kwizzles: It should be sufficient to have:

piwik_hosts_alias = ['*.example.com'];

This only applies to new visits. It won’t correct older entries in your database.

matthieu: Yes, this is a behavioural difference on Safari. Other browers return a lowercase hostname. This is fixed in the new piwik.js.[/quote]

i of course checked for new recoirds only
will try to debug it the next days

thanks for your input!

hi, first thanks for the help!

i got it now working, mostly …

maybe it would be good to tell the user somewhere
to use lowercase in the piwik_hosts_alias variable or
add a toLowerCase() at line 193 …

192             for (var i=0; i < _pk_hosts_alias.length; i++) {
193                     alias = _pk_hosts_alias[i];

i am not sure about mixed cases in the hostnames
i think, since dns is case insensitive, everything should be lowercased
i’d like to have the statistics for mypage.com MyPage.com added together

i also don’t know where to implement that, in .js
lowercasing the host part of document.location.href ?

do it in .js because its actually fixing a browser issue might be an argument

in php part i am not sure where, maybe in Tracker/Action.php
generateInfo() ?

This is now fixed in SVN: http://dev.piwik.org/trac/changeset/1019

yes i saw that

but what about preventing mixed case hostnames from safari browsers showing up, i dont see something handling that in svn current piwik.js?

Thanks. Fixed in SVN.

just updated to latest.zip
and now i got mypage.com as well as MyPage.com in outlinks again
i got www.mypage.com and mypage.com in piwik settings page for the site
and using javascript alias “*.mypage.com”

i checked piwik.js and the lowercasing seems to be there … so i dont really get whats the problem

any idea?

As before, the change doesn’t modify outlink data collected prior to the upgrade. If you have some new insight into the cause, we’d appreciate it.