Piwik for facebook messenger chatbot

Hey :slight_smile:
I am using Facebook messenger chatbot service for my personal homepage.
there is any way to integrate piwik in that platform?

Thanks :slight_smile:

Hi,

I don’t know how Facebook messager bots work, but I assume they aren’t based on web views, so the standard tracking code won’t work.
But there is another solution that should always work: server side tracking.
If your bot is written in php or c# you can use the official api client, but also if not you can use the tracking api to send all events that are happening in your bot to piwik:

https://developer.piwik.org/api-reference/tracking-api

Hi :slight_smile:
Thank you, it might help me!
my chatbot is written in JAVA…
but there are 3 required parameters :

Required parameters
idsite (required) — The ID of the website we’re tracking a visit/action for.
rec (required) — Required for tracking, must be set to one, eg, &rec=1.
url (required) — The full URL for the current action.

The first two are ok, but in the server side I don’t have URL for current action…

Hi,
Java should be fine. As long as you can make an HTTP request every language should work. In fact there is an official java client which may make it easier: Introducing the Piwik Java Tracker - Analytics for your Java based applications - Analytics Platform - Piwik

I am not sure, but I think you can just send some kind of placeholder url, as the statistics per visited page don’t apply for a bot.