Auto triggered click

Mr(Ace)

Jr. VIP
Jr. VIP
Joined
Jun 16, 2020
Messages
232
Reaction score
168
So, i am curious to learn how can i triggered click without the traffic user clicking it
whenever a user visits the site ?
 

rb32

Registered Member
Joined
Oct 14, 2020
Messages
53
Reaction score
20
So, i am curious to learn how can i triggered click without the traffic user clicking it
whenever a user visits the site ?
I'm not sure what you mean - can you explain?
 

daibu

Registered Member
Joined
Aug 7, 2020
Messages
96
Reaction score
53
I assume you're talking about a site you own? You can do this using JavaScript.

Code:
function clickSomething() {
    var something = document.getElementById("something");
    something.click();
}

<body onload="clickSomething()">
 

roloi

Newbie
Joined
Jan 13, 2021
Messages
18
Reaction score
2
I assume you're talking about a site you own? You can do this using JavaScript.

Code:
function clickSomething() {
    var something = document.getElementById("something");
    something.click();
}

<body onload="clickSomething()">
I know this is a bit old.. but did I understand correctly that this generates clicks without the visitor actually clicking on something?
 

daibu

Registered Member
Joined
Aug 7, 2020
Messages
96
Reaction score
53
I know this is a bit old.. but did I understand correctly that this generates clicks without the visitor actually clicking on something?

Yes, in JavaScript, you can use that to send a click event to an element. It will behave as though the user clicked his mouse on it. Of course, you won't have all the natural mouse movement events that are normally accompanying it.
 

roloi

Newbie
Joined
Jan 13, 2021
Messages
18
Reaction score
2
Yes, in JavaScript, you can use that to send a click event to an element. It will behave as though the user clicked his mouse on it. Of course, you won't have all the natural mouse movement events that are normally accompanying it.
so I'd just pop this into "console" and I'm good to go?
and is this traceable by ad networks?
 

daibu

Registered Member
Joined
Aug 7, 2020
Messages
96
Reaction score
53
so I'd just pop this into "console" and I'm good to go?
and is this traceable by ad networks?

I don't know anything about ad networks, but this is all client-side code, so yes, they could simply go to your website, examine the JavaScript and see that you are doing this. I'm sure they have a very involved process around detecting and preventing this type of abuse. If you were going to try to trigger fake clicks on ads, the better way would be to use web automation to actually visit your site and click on it. If you did that correctly, then possibly (a big possibly, depending on a lot of things), the ad company wouldn't be able to tell the difference. Doing stealthy web automation correctly, though, is a huge undertaking.
 

Milagro

Power Member
Joined
Sep 17, 2016
Messages
612
Reaction score
82
I assume you're talking about a site you own? You can do this using JavaScript.

Code:
function clickSomething() {
    var something = document.getElementById("something");
    something.click();
}

<body onload="clickSomething()">
Sorry for disturbing, where can one out this code to achieve this click on load
 

daibu

Registered Member
Joined
Aug 7, 2020
Messages
96
Reaction score
53
Sorry for disturbing, where can one out this code to achieve this click on load

The clickSomething() function could go inside a script tag. I would give you an example, but posting the reply errors out if I add the script tag to the code example. Just Google "HTML script tags" and put the function inside one in the HTML file.
 
Joined
Jul 15, 2021
Messages
6
Reaction score
0
Depends on how the ad is being served. In most if not all cases this will be impossible since there will be no elements you can target.
 
Top