Dynamic script

Can I use this same script for all installs if the URL is the only thing that changes?
See $BaseHref - this is my site URL.

Can anyone out there give me this answer before I spend the time designing it into the system?

I do see this “idsite=1” so I am thinking that this would work on the first installation for the first site, but if I added a second site, this may read “idsite=2”

Please help

Thank you,
Steve Nyhof

You’re welcome to customize the tracking code to your needs/environment.

JavaScript doesn’t do shell-like variable substitution, so syntactically, your changes wouldn’t work. But if that’s just to illustrate, then yes, the piwik url and site ID are the primary things that would differ.