Change script included in a java script file from ASPX.

Posted on 2011-04-25
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', '']);

*** END google_analytics.js snippit ***  
Question by:fsoehnge
    LVL 75

    Expert Comment

    by:Michel Plungjan
    Why shouldn't it be possible?
    LVL 29

    Accepted Solution


    Author Closing Comment

    provided  a link to documentation that started a chain that got me to where I needed to go.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now