Custom Piwik Pixel - for tracking activity on external websites

My company provides content that our clients can embed into their own websites. This embedded content comes in the form of a JS script that the client adds to their site HTML. There is an desire to be able to track how many times this embedded content is opened (on what site, what time etc.).

Putting GDPR/Consent concerns to one side for the moment. Is it theoretically possible to adapt the 1x1 email pixel and implement it into the the script of the embedded content?

Something like below:

img style=“border: 0;” src=“https://example.piwik.pro/piwik.php?idsite=00000000-0000-0000-0000-000000000000&rec=1&bots=1&url=https%3A%2F%2Fexample.com%2Fcatalogue-opened%2Fcompany_xyz&action_name=Catalogue%20opened&_rcn=external%20catalogue%20open&_rck=company_xyz”>

Let me know, thanks.

Hi @Robert_Clements,

To answer your question - as long as the JS script is able to send a HTTP request when the content is opened then you should be able to use the example to track this interaction.

More information on the Piwik PRO HTTP tracking API can be found here:

1 Like