Javascript error for tracking tag script


(thomasjanotta) #1

after embedding the javascript tracking according to piwik.org/docs/javascript-tracking/
i get an error in IE8 and FF3.6.x

error: missing : after property id
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {$IDSITE});

the arrow points to the closing bracket after $IDSITE

how can i fix it.
will pages still be count?

thanks


(Thomas Seifert) #2

you were missing the important part:

In your Piwik tracking code, {$PIWIK_URL} would be replaced by your Piwik URL and {$IDSITE} would be replaced by the idsite of the website you are tracking in Piwik.

At least {$IDSITE} wasn’t replaced by you. So there won’t be any tracking until you fix the code.


(Fabian Becker) #3

Don’t copy the tracking code from the piwik.org homepage. Go into your Piwik installation, click on Settings -> Websites and select “Show tracking code” for the page you want to track.


(thomasjanotta) #4

Hi, thomas, fabian,
thanks.
after first install it worked, then i made a mistake and didn’t know where to find the js-tag after reinstall/update.
thanks for the hint. now everything works fine.

kind regards.