Skip to content

Commit 5382f77

Browse files
committed
more cleanup sigh
1 parent 078139e commit 5382f77

File tree

1 file changed

+11
-6
lines changed
  • src/connections/destinations/catalog/podsights

1 file changed

+11
-6
lines changed

src/connections/destinations/catalog/podsights/index.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ analytics.page()
2727

2828
Segment sends Page events to Podsights as `view` events.
2929

30-
Podsights is an attribution platform, and as such, we need more context about the visitor than just a User ID. Analytics.js [automatically collects context fields](/docs/connections/spec/common/#context-fields-automatically-collected). Podsights requires certain context fields and properties for page calls. Below is an example of a raw JSON payload that contains the minimum requirements.
30+
Podsights needs additional context for attribution, including certain fields inside the `context` and `properties` objects. Analytics.js [automatically collects these fields](/docs/connections/spec/common/#context-fields-automatically-collected), but you must provide them manually when sending events server-side.
31+
32+
Here’s the minimum required structure for a Page call:
3133

3234
```js
3335
{
@@ -46,9 +48,9 @@ Podsights is an attribution platform, and as such, we need more context about th
4648
```
4749

4850
For page events, Podsights requires a `context` object that contains a `userAgent` and an `ip` field and a `properties` object that contains a `referrer` and a `url` field.
49-
As you can see in the page event's raw JSON payload above.
51+
As you can see in the page event's raw JSON payload.
5052

51-
The `context` and `properties` object are required, along with the fields in them. If you're using Segment server-side, you must send these attributes. Otherwise, Podsights will return a `400 HTTP Error`.
53+
If any of these required fields are missing (especially if you're sending events server-side), Podsights may return a `400` HTTP error.
5254

5355
## Track
5456

@@ -65,15 +67,18 @@ analytics.track('Order Completed', {
6567

6668
Track calls will be mapped to Podsights events. Podsights supports the following from the Segment Spec:
6769

68-
6970
* [Signed Up](/docs/connections/spec/b2b-saas/#signed-up) as `lead`
7071
* [Product Viewed](/docs/connections/spec/ecommerce/v2/#product-viewed) as `product`
7172
* [Product Added](/docs/connections/spec/ecommerce/v2/#product-added) as `addtocart`
7273
* [Checkout Started](/docs/connections/spec/ecommerce/v2/#checkout-started) as `checkout`
7374
* [Order Completed](/docs/connections/spec/ecommerce/v2/#order-completed) as `purchase`
7475

75-
For track events Podsights requires a `context` object that contains a `userAgent` and an `ip` Podsights also requires a `page` object that contains a `referrer` and a `url` field.
76-
Analytics.js [automatically collects context fields](/docs/connections/spec/common/#context-fields-automatically-collected). Podsights requires certain context fields for track calls. Below is an example of a raw JSON payload that contains the minimum requirements.
76+
Track calls must include:
77+
78+
- a `context` object with `userAgent` and `ip`
79+
- a `context.page` object with `referrer` and `url`
80+
81+
These fields are required whether they're sent through Analytics.js or server-side. Here’s a minimum working example:
7782

7883
```js
7984
{

0 commit comments

Comments
 (0)