Hey everyone,
I am working on integrating Piwik Pro with our system & I could really use some help. I have been trying to figure out how to make the API calls work properly but I am hitting a bit of a roadblock. I am having trouble with sending custom event data through the API. The documentation is helpful but I am still a bit unsure about the right parameters to use and how to structure the data for best results.
For anyone who is done a similar integration, can anyone share some tips or common pitfalls to avoid? I want to know-
The most efficient way to send custom events.
Best practices for handling authentication.
Any troubleshooting tips in case things are not working as expected.
As well, I found these resources when doing research on this; Issue with API Integration for Website Analytics on Piwik PRO & Also, if you have faced any issues with API rate limits or performance, I want to hear about how you overcame them. One last thing, if you have integrated Piwik Pro with sf features any advice on that would be greatly appreciated as well!
Thank you…….
Hi,
could you add some details about your specific problem? Sending custom events is not very different from sending page views, so I wonder what exactly you send and what is the result.
Also, API limits should not really apply when you send data (as long as the volume does fit your plan). Authentication is only required for sending specific data (was it the IP?) so just start unauthenticated.
Debugging requests you send yourself is possible with the tracker debugger and / or by looking at the responses you get.
best,
Markus
Hi @lysander,
Here’s a tip that can help you in regards to sending to Piwik PRO things like custom events or any other events:
-
On the website where you are testing Piwik PRO, send JS methods (in console for example) of events that you want to learn the API call for (here’s the documentation for js methods like custom events).
-
In the network tab check the ppms.php request that was send due to the method being used. (You are interested in Payload to be exact)
-
Use our API documentation to understand what exactly is being send in the request from above.
-
When trying to figure out how the events are detected you can also rely on this guide on our help center.
Following those steps should help you better understand how Piwik PRO requests and API works. I myself often send example requests to remind myself how they usually look like. Note that you do not have to follow the exact structure from the requests sent with JS methods use as they might have more information that you actually need, the most important part is correct idsite so you are able to recognize where the event was send to inside of Piwik PRO tool.
Best,
Oliwer