Top 1% !
Popularity: 7192nd place
Modified Jan 9, 2014

Published on:

No tags for this snippet yet.

Annotate your deployments in Piwik automatically

Annotate your deployments in Piwik automatically:
post this code
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
# 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: ```shell curl "http://YOUR_PIWIK_DOMAIN/?module=API&\ method=Annotations.add&\ idSite=YOUR_SITE_ID&\ date=today&\ note=Deployment&\ &token_auth=YOUR_SECRET_API_TOKEN" ``` 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