by
0
145 Views
3 Badges
Top 5% !
Popular
Specified
Popularity: 4210th place
Created
Modified Jan 9, 2014

Published on:

No tags for this snippet yet.
LanguageMarkdown
SourceGithub

Annotate your deployments in Piwik automatically

Annotate your deployments in Piwik automatically: 
gistfile1.md
post this code
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="http://www.snip2code.com/Embed/19131/Annotate-your-deployments-in-Piwik-autom?startLine=0"></iframe>
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 https://gist.github.com/8335559