StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Help

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 04-30-2006, 04:48 AM
carl_v carl_v is offline
Junior Member
 
Join Date: Apr 2006
Posts: 1
Default embedding within existing JScript

Hi All,

How do I embed the statcounter into another set of script tags?

Put another way...my current code is as follows and I want to count how often various functions are called i.e.
<script blah blah bah>
.
.
function one() {
.
- call projectone at statcounter from here -
}
function two() {
.
- call projecttwo at statcounter from here -
}
</script>

Can this be done? I cant figure out how to embed a set of <script></script> tags within another <script></script> pair.

Any insights would be most appreciated
  #2  
Old 04-30-2006, 05:04 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,172
Default

I don't think it will actually work. Haven't tried though.

But in general, to embed a js script into another js script you will need to write the embedded script out using document.write and put all of it inside some quotes (different from those already being used).

Do one line at a time or you'll get lost. You have to break apart <script as <scr and then ipt, similarly for </script> . Don't even bother with the noscript portion as it will definitely not apply.

You'll also have to probably replace / by \/ and so on. Kind of tedious. And doubtful. For one thing don't expect the page visited nor the referrer to be the script in which you are trying to embed this.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:47 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.