Hi Axel,
Although the syntax between the two is similar, filters and segments
fundamentally operate differently. If you haven't seen it, we created
a video that tries to explain the two:
http://www.youtube.com/watch?v=7nJzwDIf7r4
For filters, when you make an API request you get back entries of data
which represent rows in a table. Adding a filter simply includes or
excludes rows of that final table.
Segments operate at a lower level. Currently Google Analytics collects
a stream of "hits" (pageviews/events/etc) which are associated with a
session. Each dimension and metric Google Analytics exposes can be
represented as a function where the parameter is all the sessions in
the selected date range. GA computes the values (dimensions and
metrics) of each function and returns the results. Adding an advanced
segment specifics which sessions should be passed to these functions.
So writing segment=dynamic::ga:country==Canada will only compute the
specified dimensions and metrics for sessions where the country was
equal to Canada. Something to keep in mind here is that advanced
segments currently only operate on sessions.
In your question above, the difference has to do with the fact that
ga:country is a session level dimensions and page path is a page (hit)
level dimension.
Since advanced segments operate on sessions,
segment=dynamic::ga:country==Canada will only return sessions (visits)
that came from Canada. And filters=ga:country==Canada will pull all
session (visit) data but only return sessions (visits) from Canada. So
they end up returning equivalent results.
Using segment=dynamic::ga:pagePath=~/company/
will return sessions that ONLY had at least one page view with a url
that matches the ~=/company/ expression. These sessions are then
passed to the dimension and metric functions and your results are
computed on the fly.
only using filters=ga:pagePath==/company/
will compute data for ALL sessions, but only the rows where the
expression matched would be returned from the request.
I hope this helps.
-Nick