segmentio/analytics-node — pull request #26 by skaapgif (2014-07-07 16:43:41+00:00)
Title: analytics.page documentation / library mismatch

From https://segment.io/docs/libraries/node/:

> A few properties are automatically added to each .page() call. For example, if you call:
>
> analytics.page('Pricing');
> We will translate that to the following without any extra work from you:
>
> analytics.track('Pricing', {
> title: 'Segment.io Pricing',
> url: 'https://segment.io/pricing',
> path: '/pricing',
> referrer: 'https://segment.io'
> });

I was sceptic (but hopeful) when I saw .page() promised to do all this without being passed a request object or headers. It looks like all the documentation for page is from the browser library.

Having said that, it would be very handy for the library to extract these from a headers argument though, any plans for adding this? I'm having to write this for a wrapper around analytics-node anyway, so won't mind creating a PR to integrate it into the library.