We haven't written any code so far in this chapter, but I bet you know it's coming. Let's get started with something easy. Then we can jump into the deep end. Embedding a Piwik widget in another page, such as the sidebar of your website, is easy. It is just like any other badge or widget you may add to your blog. Just generate the code right in your Piwik installation, paste the code where you want it on your site, and you are done. But there are a few details that mean the difference between a widget you can see and useless code.
Piwik is going to give you the code you need, but first you have to make sure that your user named anonymous can see it, or else you may trick yourself. Because you are logged in to Piwik, you will be able to see the widget where you embedded it, but no one else will. So, go to Settings | Users:
Choose the website account whose widgets you are going to embed. In this example, I choose my own:
Click on the View...