Skip to content

Commit e4b815d

Browse files
committed
Collect page views updates
1 parent 6f35151 commit e4b815d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/guides/how-to-guides/collect-pageviews-serverside.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ With this approach, you might use a request "middleware" to log a `pageview` w
1010

1111
There are a few things to be mindful of if you want to make sure you can attribute these (anonymous) page views to the appropriate user in your client-side source (eg, for effectively joining these tables together to do down-funnel behavioral attribution). You'll want to ensure they share an `anonymousId` by respecting one if it's already there, and setting it yourself if not. To do that, you can read and modify the `ajs_anonymous_id` cookie value in the request.
1212

13-
Be sure to pass through as many fields as you can in our [page](https://segment.com/docs/connections/spec/page/) and [context](https://segment.com/docs/connections/spec/common/) spec, so that you get full functionality in any downstream tools you choose to enable. We recommend specifically ensuring you pass the **url, path, host, title, search, and referrer** in the message `properties` and **ip and user-agent** in the message `context` .
13+
Be sure to pass through as many fields as you can in Segment's [page](/docs/connections/spec/page/) and [context](/docs/connections/spec/common/) spec, so that you get full functionality in any downstream tools you choose to enable. Segment recommends specifically ensuring you pass the **url, path, host, title, search, and referrer** in the message `properties` and **ip and user-agent** in the message `context` .
1414

15-
Here's an example of an express middleware function that covers all those edge cases!
15+
Here's an example of an express middleware function that covers all those edge cases:
1616

17-
If you have any questions or would like help generally adopting this method for other languages and frameworks, be sure to [get in touch](https://segment.com/help/contact/).
17+
If you have any questions or would like help generally adopting this method for other languages and frameworks, be sure to [get in touch](https://segment.com/help/contact/){:target="_blank"}.
1818

1919
```js
2020
import express from 'express'

0 commit comments

Comments
 (0)