Add tracking pixel to html button |
Add tracking pixel to html button |
texas |
Feb 5 2018, 09:35 AM
Post
#1
|
Group: Members Posts: 1 Joined: 5-February 18 Member No.: 26,583 |
I need the tracking pixel to fire with a button click. How do I insert this code into a button so it fires when clicked. I am using this on a wordpress site.
Please give an example of the code and as much detail as possible. Thanks <script type="text/javascript" src="https://thesite.net/e?adv=10444&ca=0&acc=375&tag=U6916"></script> |
CharlesEF |
Feb 5 2018, 08:06 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
You could use an <a> tag to place the 'href' in. Then you use CSS to style the <a> link as a button.
OR Use a <button> tag with an 'onclick' event to run a javascript function. In the function you would use 'window.location.href = "https://thesite.net/e?adv=10444&ca=0&acc=375&tag=U6916"' A google search will show thousands of examples. |
pandy |
Feb 6 2018, 12:30 AM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Too little information. I assume the script generates a pixel image and if so it probably won't work to just link to the script. Since you use a fake URL we can't read the script and can't find out exactly what it does. And what's the button for? What does it do, more than hopefully activate the counter thingie?
If what you want is to count clicks on the button, there are easier ways to do that. |
Lo-Fi Version | Time is now: 18th April 2024 - 09:25 PM |