Auth token


#1

I downloaded WP-Piwik from wordpress. Activated and found that piwik created content in the wp database. This is an Intranet site. Found path to server listed under PHPMyAdmin in wordpress instance and entered in self-hosted (php API) and the path that is listed in the db wp-piwik_global-piwik_url and _path (so I figure this is the correct path, no?). It is requiring Auth token. I am not sure what I need to do to get this token? I have read many things and still cannot decipher where this API token is generated. Would someone point me in right direction? I thought I could figure out but I am at a loss. Have read all posts here, someone asking same question was directed to WP documentation… I thought maybe it was similar to Formstack and I could generate a API key here on website, but I don’t see anywhere to do this, or I am missing something? Sorry for being such a newb.
On same server as Wordpress.
Piwik Mode: Self-hosted (PHI API)
Piwik Path: http://servername/wordpress/wp-piwik
Auth token: (no clue?)
Auto config: Checked

I am thinking I should have downloaded piwik and created a db instance? Is this easier?

Many Thanks…


Auth token api - where?
#2

Hi galder56!

I don’t know if you have found it out in the meantime, but here are some tips:

It sounds like you don’t have a Piwik installation. I haven’t looked into it in detail, but if I remember it correctly, WP-Piwik is a Wordpress plugin which makes it easier embedding Piwik widgets (or possibly the entire dashboard) into Wordpress sites (so that one doesn’t have to work with iframes manually in HTML). But, to be embedded, those widgets need come from somewhere - namely a Piwik installation.

Once you install Piwik, and log into it, you will find the token_auth for a specific Piwik user in that user’s configuration.

Hints:

  • You can install Piwik into the same domain if you like, e.g. http://servername/whatever - i.e. in parallel to your existing http://servername/wordpress. (Although it is probably easier to handle (backup, etc.) if it’s on a different domain.)

  • Make sure to not have the word “piwik” anywhere in the Piwik installation URL (domain name, installation directory, etc.). Or any other word possibly indicating user tracking. Otherwise it can be easily blocked by ad-block browser plugins. (Use whatever other domain and/or directory name instead - “mycatsnameistom” or whatever. I hope that one is not in the blockers’ lists. :slight_smile: )

  • Do NOT use a token_auth of a Piwik super-user or administrator for widget embedding!!! Create an additional user with “view” rights only (you’ll see what I mean in the Piwik administration settings) or better: enable and use the “anonymous” user (with its token_auth) for that. See, e.g., 301 Moved Permanently for background.

I hope this helps to point you in the right direction. I don’t use widget embedding myself, so can’t give you more details then this. But there is a ton of documentation and examples out there.