StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Help

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2017, 05:37 PM
Mapping Support Mapping Support is offline
Junior Member
 
Join Date: Jan 2011
Posts: 11
Default Can 1 web app have multiple statcounter projects?

I have a browser app called Gmap4 that is based on the Google map API.
Since Gmap4 can be used in several different ways, I set up several statcounter projects.

Is statcounter supposed to handle something like the following?
The problem is that I get hits showing up in project 1111111 that should not be there.

var sc_project=0;
var sc_invisible=0;
var sc_security="0";
if (map = "A") {
sc_project=1111111;
sc_invisible=1;
sc_security="_________";
} else if (map = "B") {
sc_project=2222222;
sc_invisible=1;
sc_security="________";
} else {
// Everything else.
sc_project=3333333;
sc_invisible=1;
sc_security="________";
}
scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "http://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"statcounter.com/counter/counter.js'></"+"script>");
Reply With Quote
  #2  
Old 02-26-2017, 01:10 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,052
Default

You can do that assuming your variable map is properly defined
__________________
Christina
>>Forum Moderator<<


Useful Web Tutorials

Please do not PM me for support. The forum is here for that.
Reply With Quote
  #3  
Old 02-26-2017, 02:51 AM
Mapping Support Mapping Support is offline
Junior Member
 
Join Date: Jan 2011
Posts: 11
Default

Thanks for confirming that it is doable.
I tweaked my code a bit.
Maybe that will help.
Reply With Quote
Reply

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 02:01 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.