Google searches for a keywords *Updated*

opsfafsme

Member
Rule The Galaxy
VIP
Joined
Jul 2, 2018
Messages
133
Reaction score
14
Website
OnlinePiercingShop.com
Achievement
Our favorite macro really stops working if we set a mobile client in the user agent line.
This is because Google is downloading a little different content for such clients.
This small fix to the classic "Google Searches Keyword" macro helps solve this problem.

You need to change the settings to your needs.
keywords - an array of your keywords (the larger the array, the more human-like the search)
max_page - the maximum number of pages on which to search for your keywords
domain - your domain
clicks - the number of internal clicks on your site.
set the Duration (in campaign setting) sufficient to run the macro.

JavaScript:
await Delay(Random(2500,3000));
await WaitForLoading();
var page, scrl, random_keyword;
var clicks = Random(13,25);
var max_page = Random(3,5);
var myDomain = "getsatisfaction.com";
var keywords = [
    "Matt Damon films",
    "MAtt damon imdb",
    "matt DAMON movies",
    "matt damon wife"
    ];
    if ( await EvaluateScript("!! document.querySelector('input.gLFyf.gsfi')") ) {
        await ClickByXpath(GenerateXpath("input", "type", "text"));
    } else if ( await EvaluateScript("!! document.querySelector('input.gLFyf')") ) {
        await ClickByXpath(GenerateXpath("input", "type", "search"));
    } else {
        Exit();
    }
    await Delay(Random(2500,3000));
    random_keyword = Math.floor(Math.random() * keywords.length);
    await Typing (keywords[random_keyword], 300, 500);
    await Delay(Random(500,1000));
    await Typing ("\r\n");
    await Delay(Random(2500,3000));
    await WaitForLoading();
    page = 1;
    do {
        do { //scroll
            scrl = Random(3,9);
            for (var i = 1; i < scrl; i++) {
                await EvaluateScript("var ddE = document.documentElement; ddE.scrollTo(0, ddE.clientHeight/(Math.floor(Math.random()*3)+9) + ddE.scrollTop);");
                await Delay(Random(100,150));
            }
            await Delay (Random(1000,1500));
        } while (await EvaluateScript("var ddE = document.documentElement; ddE.clientHeight+ddE.scrollTop < ddE.scrollHeight"))
        myTargetXpath = GenerateXpath("a", "href", "%" + myDomain + "%");
        foundLink = await GetAttribute(myTargetXpath, "href");
        if ( foundLink ) {
            await ClickByXpath(myTargetXpath);
            break;
        }
        else if (page < max_page) {
            if ( await EvaluateScript("!! document.getElementById('pnnext')") ) {
                await ClickById("pnnext");
            } else if (await EvaluateScript("!! document.querySelector('span.RVQdVd')")) {
                await ClickByXpath(GenerateXpath("span", "class", "RVQdVd"));
            } else {
                Exit();
            }
            await Delay(Random(2500,3000));
            await WaitForLoading();
        }
        else {
            await EvaluateScript("window.open('https://" + myDomain + "','_self')");
        }
        page = page+1;
    } while (page <= max_page)
    do {
        await Delay(Random(2500,3000));
        await WaitForLoading();
        do { //scroll
            scrl = Random(3,9);
            for (var i = 1; i < scrl; i++) {
                await EvaluateScript("var ddE = document.documentElement; ddE.scrollTo(0, ddE.clientHeight/(Math.floor(Math.random()*3)+9) + ddE.scrollTop);");
                await Delay(Random(100,150));
            }
            await Delay (Random(1000,1500));
        } while (await EvaluateScript("var ddE = document.documentElement; ddE.clientHeight+ddE.scrollTop < ddE.scrollHeight"))
        await Delay(Random(5000,7000));
        await ClickRandomInternalLink(true);
    } while (--clicks)
    await Delay(Random(5000,7000));
    await WaitForLoading();
Exit();
 
Last edited:
  • Like
Reactions: wernerk93

klaichich

New Member
Premium
Joined
Dec 8, 2019
Messages
7
Reaction score
1
Achievement
This is just an amazing script! Thank you very very much for posting this script!
I have one small problem though: the keywords that I use don't show up in the Google Analytics.
These visits appear with the keywords displayed as "not provided".
Is there any solution for that?
Thanks!
 

opsfafsme

Member
Rule The Galaxy
VIP
Joined
Jul 2, 2018
Messages
133
Reaction score
14
Website
OnlinePiercingShop.com
Achievement
This is just an amazing script! Thank you very very much for posting this script!
I have one small problem though: the keywords that I use don't show up in the Google Analytics.
These visits appear with the keywords displayed as "not provided".
Is there any solution for that?
Thanks!
this is probably because your site is not in the search result for this keyword and the macro ends with the loading of your site, and not by clicking on the link in the search results. There is a solution, replace Google search result and click on your link :)
 

klaichich

New Member
Premium
Joined
Dec 8, 2019
Messages
7
Reaction score
1
Achievement
this is probably because your site is not in the search result for this keyword and the macro ends with the loading of your site, and not by clicking on the link in the search results. There is a solution, replace Google search result and click on your link :)
You seem to have misunderstood me a little :)
My website is in Google search results on the first page. I am using the Google Analytics to track visitors and search quiries.
If I do a manual search in Google by a keyword and click on my website, the Google Analytics will show that exact keyword.
But when I use this script, the Google Analytics will not recognize and will not show that keyword. It appears as 'not provided'. How can I adjust something so that the keyword is recognized by the Google Analytics?
I hope you know what I mean.
Thanks for the reply!
 

opsfafsme

Member
Rule The Galaxy
VIP
Joined
Jul 2, 2018
Messages
133
Reaction score
14
Website
OnlinePiercingShop.com
Achievement
You seem to have misunderstood me a little :)
My website is in Google search results on the first page. I am using the Google Analytics to track visitors and search quiries.
If I do a manual search in Google by a keyword and click on my website, the Google Analytics will show that exact keyword.
But when I use this script, the Google Analytics will not recognize and will not show that keyword. It appears as 'not provided'. How can I adjust something so that the keyword is recognized by the Google Analytics?
I hope you know what I mean.
Thanks for the reply!
What is your site and keyword?
 

opsfafsme

Member
Rule The Galaxy
VIP
Joined
Jul 2, 2018
Messages
133
Reaction score
14
Website
OnlinePiercingShop.com
Achievement
I just checked that your site is really on the first page. Unfortunately, I do not yet know why what you described happens. We need the help of a person more experienced in SEO.

does anyone know why this happens?
 

quatio

New Member
VIP
Joined
Mar 20, 2020
Messages
5
Reaction score
0
Achievement
i have the same issue of @klaichich. Also for me... not provided keyword. :'(
 

quatio

New Member
VIP
Joined
Mar 20, 2020
Messages
5
Reaction score
0
Achievement
if we can to run macros into browser with anonymous mode, the "not provided" will be substitute with the keywords.
Is there a way for tu run the Viewer or BOT in anonymous mode?
 

quatio

New Member
VIP
Joined
Mar 20, 2020
Messages
5
Reaction score
0
Achievement
i mean that if the search on google and visit is made with browser in anonymous mode, Google Analitycs track correctly the Keyword of search.
If there is a way for to run the viewer in anonymous mode, with this script, i think that GA will track correctly our keywords.

I hope to be more clear now. Sorry for my bad english ;-)
 

owelko

Member
Premium
Joined
Oct 18, 2019
Messages
67
Reaction score
14
Location
Always on 9Hits Discord Channel
Website
www.scriptcodes.com
Achievement
As far as I know, there is no way from a web page to open an incognito window using javascript :(

You may achieve that with the JavaScript function windows.create(), it accepts an optional incognito parameter, see MDN web docs :
incognito
Whether the new window should be an incognito (private) window. Note that if you specify incognito and tabId, the ID must refer to a private tab — that is, you can't move a non-private tab to a private window.
Example:

windows.create({"url": url, "incognito": true});

Check Browser compatibility.

only work for browser extensions.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu