2 Badges
Top 5% !
Popularity: 4296th place
Modified Jan 9, 2014
This snippet is Public
No tags for this snippet yet.

Annotate your deployments in Piwik automatically

Annotate your deployments in Piwik automatically:
post this code
<iframe id="embedFrame" style="width:600px; height:300px;" src=""></iframe>
Click on the embed code to copy it into your clipboard Width:Height:
Leave empty to retrieve all the content First Line:Last Line:
# Track deployments with Piwik's Annotation API

If you use analytics tools to monitor your website, a good metric for determining the effect of changes is the time of a deployment. Does the conversion rate really improve with the latest adjustments? Has the number of 404 errors decreased since we fixed that script?

Like other analytics products, Piwik allows you to annotate your data. Wouldn't it be great if all deployments were noted automatically? With the Annotation API it's actually quite simple.

In your deployment process, just add the following line to your script or post-receive hook and fill in the placeholders:

curl "http://YOUR_PIWIK_DOMAIN/?module=API&\

You can find your authentication token in your Piwik dashboard under the "API" link. _Just make sure this script is put in a safe place and is not publicly accessible, as the token works like a password to your Piwik service._

It's also recommended to include the exact time of the deployment and the revision number in the note.

If you want to be updated about similar snippets, Sign in and follow our Channels
Originally posted on