I have XML displaying in dynamic text boxes. Some of the text are a href links, I also want to track which links are clicked by sending a javascript call to Google Analytics. Is there a way to do it and also open the link in a new window?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you need is called “asfunction”. See more here http://kb2.adobe.com/cps/156/tn_15639.html or here http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary073.html.
However if the text from XML is dynamic you would have to replace the stings on the fly. Use the original url as a parameter and receive it as paramaeter in the function.