Дискусии » Заявки за създаване
Clean Google Custom Search tracking.
This works:
- Install Direct Google userscript
- Edit its code in your userscript manager (Greasemonkey)
- Add
// @include /^http.+?&cof=.+?&q=.+?&sa=Search.*/
on a new line after the existing @include line - Save, reload the page(s)
This trick might work with other userscripts (search for google direct or google track).
P.S. @zanetu, do you think this is worth including in your code?
Excellent. I hope it get included in next version of Direct Google and not get forgotten.
P.S. @zanetu, do you think this is worth including in your code?
I'm afraid not. Google custom search can be embedded in pages of any url pattern (e.g. http://jsfiddle.net/gh/gist/library/pure/6130833/) .
I suggest users add url manually in greasemonkey (or any other userscript manager):
firefox -> about:addons -> user scripts -> direct google -> preferences -> user settings -> included pages -> add...
Since "Direct Google" is not intended to work on non-google websites, however, adding non-google urls might be a bit risky (e.g. breaking existing page functions) .
For those who wish to stay on the safe side, delete Line 45, Line 46 and Line 51 through Line 104, so that existing page functions wouldn't be broken.
Is it possible to create separate Google Direct Custom and put most common patters in it? This pattern &client=internal-uds-cse&usg= seems to repeat. How to make include pattern out of it?
Also, I deleted lines you suggested and Direct Google does not work anymore on http://behindmlm.com/search-results/?cx=partner-pub-1989076782517459:6677894630&cof=FORID:10&ie=UTF-8&q=Francisco&sa=Search
// @include http*&client=internal-uds-cse*
might work- you don't have to delete those lines if the sites you use don't break
@boris
That deletion works for me, both on firefox v31.6.0 and chrome v41.0.2272.118. Make sure you delete the correct lines. (Did you see any console error, which is usually highlighted in red, after pressing CTRL+SHIFT+J in firefox? ) Note that only four lines remain in modifyGoogle() after deletion, i.e.
function modifyGoogle() {
//remove custom search redirects
$('.gsc-results a[href][data-cturl]').each(function() {
blockListeners(this, 'mousedown')
})
}
After deletion of aformentioned lines, the userscript essentially turns into what you call "Google Direct Custom", except for userscript metadata (e.g. @ include, @ name, etc).
Don't forget to add an @ include matching "http://behindmlm.com/search-results/?cx=partner-pub-1989076782517459:6677894630&cof=FORID:10&ie=UTF-8&q=Francisco&sa=Search", as wOxxOm has suggested. Alternatively, if you care little about performance, use
// @include /^https?\:\/\//
to make the userscript globally functional.
Clean Google Custom Search tracking.
This is example of Google Custom search
http://behindmlm.com/search-results/?cx=partner-pub-1989076782517459:6677894630&cof=FORID:10&ie=UTF-8&q=Francisco&sa=Search
When you click on one of the results, it adds
&sa=U&ei=KYspVcD8ELDPsQSJkYDABA&ved=0CAoQFjADODI&client=internal-uds-cse&usg=AFQjCNE32LCS5THMP-QdlM--0iz36gFsVw
type of string at the end. Now result page opened in new tab(my settings) reports as not found and bunch of tracking is added. So by preventing Google from adding this string, we would prevent tracking and improve navigation.
Is there a way to remove it on all Google Custom Search pages, not just on this website?