Tracking offsite POST requests



I have a form on a site, say This form POSTs its data to How can I track those POST request?


(Matthieu Aubry) #2

Depends how you want to track it, what kind of reports you want from this data?


Hi matt!

Thanks for your reply!

Our Homepage (/) contains a form, where our customers can login to a customers portal. I want to know how many our visitors are using these form, how many are new visitors and how many visitors are returning visitors. It would me nice if I could see those form submits in the visitor log (like clicks on links to external sites) and to have some kind of summery like x visitors used the form, y returning visitors (without those submitted the form), z new visitors (again without those submitted the form).



I’m not 100% sure if this is the best place for this - move it on if not. Let me just propose this hypothetical situation:

  • User fills out some forms detailing their requirements for ‘widgets’
  • User is presented with a list of the best widgets available
  • User clicks on their chosen widget offer, and is taken to the web site of the widget provider via an affiliate link
  • User purchases the widget successfully and reaches the widget provider’s sales confirmation page

Now, what I would like to do is track any sales which take place on the widget provider’s web site, without being able to add custom code on their sales confirmation page.

Is there any way I can conceivably do this?


(Matthieu Aubry) #5

Tom, to do this I would create a Goal “Fill in form” and then register the goal manually using the Javascript function trackGoal( X ); It will then show up in Visitor Log and you will see how many new/returning visits are converting this goal.

James010, you want to track other websites activity without adding a code in their site? not possible. The only way is that the site either loads some kind of beacon that would trigger the piwik tracking API on your server: Tracking API - Analytics Platform - Matomo — or their page, after checkout, would redirect to your site…



since I don’t like defining a goal for this purpose, I rather set a custom variable. I am calling the javascript code from within the onSubmit event of the form:

var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, […]);
piwikTracker.setCustomVariable([…], “Var”, “Value”);

It is working but the page is tracked twice since I call trackPageView again. Is there a way to just set a custom variable without a call to trackPageView?