<script> function loadEvent() { document.getElementByID("clickbutton").click(); //the ID you want to be clicked console.log("works"); //just to check if the functions runs } window.onload = loadEvent; </script>
Fachbeitrag: Conversion Rate Optimierung – Blickwinkel
Every visit on the page where you place this snippet, will trigger an element click, which you can specify by its ID.
<script> function loadEvent() { document.getElementByID("clickbutton").click(); //the ID you want to be clicked console.log("works"); //just to check if the functions runs } window.onload = loadEvent; </script>
WHERE TO PLACE THIS CODE?
Put it somewhere on your page, where the element which should be clicked lives.
Please share your thumbsup, suggestions, edits, and questions within my comment section down there.
I love posting snippets for you, but with a bit of feedback, it gets even more fun. 😀
Jeder mag Cookies! Du kannst alle Cookies akzeptieren oder in den Cookie Settings auswählen, welche genutzt werden dürfen.
Name | Domain | Purpose | Expiry | Type |
---|---|---|---|---|
wpl_user_preference | eboosting.net | WP GDPR Cookie Consent Preferences | 1 year | HTTP |
Name | Domain | Purpose | Expiry | Type |
---|---|---|---|---|
_ga | eboosting.net | Google Universal Analytics long-time unique user tracking identifier. | 2 years | HTTP |
_gid | eboosting.net | Google Universal Analytics short-time unique user tracking identifier. | 1 day | HTTP |
_gat_UA-60203069-1 | eboosting.net | Google Analytics tracking cookie. | Session | HTTP |
Analytics | eboosting.net | Analytics Tracking | 1 year | HTTP |