How can i add my script from code behind to end of the file
I have script for Google Analytics in my master page at the bottom of the page. it is just below the tag..... from the code behind i need to push some information to the google analytics. using the _gaq variable which there in that script. sample: in my master page
i want to add my script after this script. i used RegisterStartupScript but the variable wich there in that .js is not loaded so that object throws an error undefined. I dont have permission to move the google analytics script to above the tag. if i use RegisterClientScriptInclude then one more copy of file i will load. that also not preferable. becouse google analytics shuld run after all page is loaded. so How can i add my script from code behind to end of the file. after this 开发者_StackOverflow社区script???
help me Guru
You can to added javascript file at the end of the tags. so it run after all tag initialization.
<html>
<head>
</head>
<body>
/*
// your codes
*/
<!--added your google analytic script here -->
<script src='js/ga.js' type="text/javascript"></script>
</body>
</html>
It works let me know if not..
精彩评论