API - Visitor Profile


#1

How would I use the API to include the visitor profile in an email enquiry from my website?

The enquiry form I use already captures the IP address of the visitor - I wanted to extract the visitor profile based on IP and insert it into the email sent.


(Matthieu Aubry) #2

Yes it’s possible.
You can create a custom segment for this Visitor, based on visitor IP segment or visitor ID (if you know the ID). Segmentation - Compare segments of visitors - Analytics Platform - Matomo

Then you can include the Visitor Profile as a “widget” in your application or maybe Email: Embedding Piwik Reports in Other Websites or Apps - Analytics Platform - Matomo

Alternatively you can use the raw data to write only the info you want in the email, by using the Live API for the Visitor profile: The Visitor Profile - Analytics Platform - Matomo