473,545 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to show onClick as a completed goal on Google Optimizer

Hello,

I have the following button on my site:
Expand|Select|Wrap|Line Numbers
  1. <button onclick="return DoSearch('EN','_parent','111', document.getElementById('ySearch').value, 'www.test.com', '112', 'SE')" type="button" style="cursor: pointer; background: url(images/button.jpg);border: none;"> 
  2. <b style="display: none;">Search</b> 
  3.  </button> 
  4.  
I would like to add Google Website optimizer and to determine that every time a visitor clicks the button, it will be considered as a goal completion.
In order to do it, I need to somehow add the below code, but I'm not sure how exactly to do it and would appreciate your help.
Expand|Select|Wrap|Line Numbers
  1. onClick="goalTrack();"
  2.  
Expand|Select|Wrap|Line Numbers
  1. <script>
  2.  function goalTrack(){
  3.     var pageTracker=_gat.getTracker("UA-XXXXXX");
  4.     pageTracker._trackPageview("/kkkkkkkkk/goal");
  5. }
  6. </script>
  7.  
Thank you!
Oct 10 '10 #1
1 1206
acoder
16,027 Recognized Expert Moderator MVP
Does the following not work?
Expand|Select|Wrap|Line Numbers
  1. <button onclick="goalTrack(); return DoSearch(.."
Oct 13 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1600
by: SyrU | last post by:
I have the below code. I am trying to send information to a subroutine, I am getting an Object Required Error. <input type="button" name="pSearch" value="Search" onclick="DisplayRecords()"> Then in my ASP page I have this Sub DisplayRecords()
0
819
by: Timothy H. Schilbach | last post by:
Hi Everyone, I have an easy question I think. I have this datagrid and it has a button in it that deletes a field in my database. I dont want someone to accidentally click on it and BOOM! data gone. I used to be able on normal buttons add a Java onClick event right in the button itself to do this: onClick="window.alert('teste');"
13
2513
by: Logos | last post by:
There seems to be a serious difference between how FF an IE handle an anchor with an href containing a # and an onclick event. If the onclick event returns false, IE does not change window.location.href to include the #. FF does. (eg) <a href="#moo" onclick="alert('moo'); return false;"> After clicking in IE, location bar in browser...
9
1690
by: Todd | last post by:
Hello We have a page that loads a long list of things. Each row has an onclick where you can open a window for more information. When you do that the parent page refreshes to the top of the page....so if you were near the bottom, you would have to scroll back down to get back to where you were. I would like the parent page to hold its...
14
2162
by: Mtek | last post by:
Hi, We have a form defined with buttons like this: <a class="save_menu" href="javascript:document.Detail_Screen.action = 'savedata.php?screen=EDIT';document.Detail_Screen.submit();">Update</ a> The form also has an onSubmit action to vall a validation routine:
0
7487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7420
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3476
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1908
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.