Email tracking

Good morning. I would count on a specific link to the entry, who send in e-mial.
I am doing so I assume the goal.
Goal is triggered When visitors - Visit a given URL (the page or group of pages)
point out (default) Goal can be converted only once per visit.
Objective is to ID 2
I create an e-mial and paste

<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "" : "");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
But it does not work. What am I doing wrong
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackGoal(2); //add 
} catch( err ) {}
</script><noscript><p><img src="" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->

For email tracking, you must better use the Campaign Tracking mechanism[/url] and track your clicks on emails. And to bookmark: [url=]Campaign URL generator