1 link to track goals for all of my sites?


Ive finished adding my sites to piwik and would like to track goals. Is there any way to track goals for all of my sites using one piwik script/code? I use swreg.org and cannot add individual codes for my products. Thank you in advance.

Would something like this work for you?


<script type="text/javascript" src="http://mysite/piwik.js"></script>
<script language="JavaScript" type="text/javascript">
var tracker = Piwik.getTracker('http://mysite/piwik.php', 1);

// map product codes to goal IDs
var productsAndGoals = [
    'productcode1' : 1,
    'productcode2' : 2
    tracker.trackGoal(productsAndGoals['###BRPRODCODE###'], '###BRTOTAL###');

where should I put it? in global template? …but I dont have any global template , darn

I have over 200 sites in piwik, would this code track goals of all 200 sites?

Edit: disregard the first line :slight_smile: