0

I'm working on a web application that uses node.js + express. Our team has decided that all related pages must use a single URL and be distinguished only by its method.

So, for example: we have a group edition page. GET /groups gets the html, which includes the edition form, and POST /groups saves the changes.

The issue is that I only desire to track the POST /groups request. However, on the Google Analytics configurations, I only found URL-related tracking, nothing about specific HTTP methods.

Can this be done?

1 Answers1

0

If you have implemented GA via the standard client-side tracking code then no, GA will not be aware of the http method (JavaScript has no access to http headers). It should however be trivial to render a Javascript if condition into the code depending on the request method.

Community
  • 1
  • 1
Eike Pierstorff
  • 31,996
  • 4
  • 43
  • 62