megs
Lurker
- Joined
- Dec 25, 2022
- Messages
- 25
I found these in a nice lander. Thought I'd share in case someone else finds them useful.
This is one checks for scrolling
Does this counts fb pixels placed?
Checks for screen orientation? If so, why would be useful?
Checks how many times the site countdown
Code:
<script type="text/javascript">
var scroll = 0;
window.onscroll = function(){
if( scroll != 1 ){
scroll = 1;
var o = document.createElement("img");
o.src = "https://domain.com/click.php?event3=1";
}
}
</script>
Code:
<script>
var img = document.createElement('img');
img.onload = function() {
var o = document.createElement("img");
o.src='https://domain.com/click.php?event2=1';
};
img.onerror = function() {
var o = document.createElement("img");
o.src='https://domain.com/click.php?event2=0';
};
img.src="https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Ffavicon.ico"
</script>
Code:
<script>
if (typeof(window.orientation)=="undefined")
{
var o = document.createElement("img");
o.src='https://domain.com/click.php?event4=0';
}
else
{
var o = document.createElement("img");
o.src='https://domain.com/click.php?event4=1';
}
</script>
Code:
<script>
function pushToTrackerViaImage(){
var pushURL = 'https://domain.com/click.php?event6=1';
var img = document.createElement('img');
img.src=pushURL;
img.style.display='none';
document.body.appendChild( img );
}
function pushAfterTimeout(timeout){
setTimeout(pushToTrackerViaImage, timeout*1000);
}
var TIMEOUT_IN_SECONDS = 20;
pushAfterTimeout(TIMEOUT_IN_SECONDS);
</script>