New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trackLink does not like relative links ? #10154
Comments
Looking at the forum post this was in 2011 or so. I'm not sure if it's supposed to track relative links or not. Ping @mattab Looking at the documentation it says |
👍 |
Hi,
So, my use case was the following :
So, this use case is a perfect example of the need for piwik callbacks : instead of setting an arbitrary timeout before redirecting, let's ask piwik.js to perform the redirect as soon as possible, as soon as its track request has been completed ; then it will execute the following callback : This being said, which piwik method to use for this ? If we look at options (a), (b) and (c), and assess what's best / more / least desirable, I think that : So, as a conclusion, I think that
What do you think of tout cela ? cheers |
Hi @er314 Maybe we should also implement the callback to the re: we look forward to your feedback as you keep using Piwik, and maybe even hopefully more of your Pull requests :-) |
Ok, for completeness, I've just submitted PR #10337 , which adds callback to trackEvent :-) |
My observation : trackLink does actually track the link ONLY if it's a full URL (then it's considered as an outgoing link), not when it's a relative link
Trying to understand what's going on, I enabled piwik.php debugging, then :
the debug message above clearly points to the problem...
adding display of the $url causing the error, I get :
ok so it seems to refuse relative links...
this brings me to function isLookLikeUrl
its purpose is to test if its argument starts with protocol://
obviously, this test fails when checking the link
-> is this the intended behaviour ?
this was not the case some time ago, according to :
https://forum.piwik.org/t/piwiktracker-tracklink-bug-in-version-1-6/5676/4
I wish I could use trackLink to track my internal URLs + use its callback feature, and have these URL appear in the Actions / Pages view, like when tracked by the regular trackPageView.
thanks !
The text was updated successfully, but these errors were encountered: