We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Change script included in a java script file from ASPX.

fsoehnge
fsoehnge asked
on
Medium Priority
267 Views
Last Modified: 2012-05-11
I have the following code that is included in my master page via an include. I need to update the java script code on page load to include a couple of additional _gaq.push statements if a condition is met. Is this even possible?

*** MasterPage.Master snippit ***
...
  <script type="text/javascript" src="/include/script/google_analytics.js"></script>
...

*** END MasterPage.Master snippit ***

*** google_analytics.js snippit ***  

...
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-525832-1']);
_gaq.push(['_setDomainName', '.framesdirect.com']);
_gaq.push(['_trackPageview']);

...
*** END google_analytics.js snippit ***  
Comment
Watch Question

Michel PlungjanIT Expert
CERTIFIED EXPERT
Top Expert 2009

Commented:
Why shouldn't it be possible?
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
provided  a link to documentation that started a chain that got me to where I needed to go.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.