Scraping form fields and storing as custom variables

We’re a B2B SaaS solution and use Matomo Cloud (loving it so far). I need to identify the ‘companies’ that are visiting my site and the unique visitors, to better understand if our account-based marketing activities are working.

I understand that a GeoIP2 dbase is not an option with Matomo Cloud. I also feel that with many people working from home during Covid the accuracy is not great.

As an alternative, I was wondering if I could somehow capture the form fields (ie. email, company, etc) of visitors and store that as a custom variable. We do not have a login on our site.

I’m a little confused by the documentation on how/when to set up UserId, etc. any help would be appreciated, I’d be happy to pay for the instruction/code to set this up if anybody is interested.

Hi,

CustomDimensions should allow you to track any arbitrary data in JavaScript:

See here for information on how to track the data in Javascript:
https://developer.matomo.org/guides/tracking-javascript-guide#custom-dimensions

Then you just need a few lines of JS that read the content of the forms.