Skip to content

Commit 1c95e36

Browse files
authored
Merge pull request #6016 from StackAdapt/am/s2s-docs-for-pr
Documentation for StackAdapt destination
2 parents 4eb7bd9 + f704d4c commit 1c95e36

File tree

5 files changed

+117
-0
lines changed

5 files changed

+117
-0
lines changed
234 KB
Loading
108 KB
Loading
20.6 KB
Loading
11.7 KB
Loading
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: StackAdapt (Actions) Destination
3+
hide-boilerplate: true
4+
hide-dossier: true
5+
beta: true
6+
id: 61d8859be4f795335d5c677c
7+
hidden: true
8+
---
9+
10+
{% include content/plan-grid.md name="actions" %}
11+
12+
By setting up StackAdapt as a Segment destination, your Segment events will be forwarded to [StackAdapt](https://www.stackadapt.com/){:target="_blank"}. This allows you to generate retargeting and lookalike audiences, track conversions, and measure return on ad spend using your Segment events - bypassing the need to install the StackAdapt pixel on your website and write code to send events to StackAdapt.
13+
14+
This destination is maintained by StackAdapt. For any issues with the destination, please [submit a ticket to StackAdapt's support team](https://support.stackadapt.com/hc/en-us/requests/new?ticket_form_id=360006572593){:target="_blank"}.
15+
16+
17+
## Getting started
18+
19+
### Getting your StackAdapt Universal Pixel ID
20+
21+
1. Log in to your StackAdapt account and navigate to the Pixels page.
22+
2. Above the list of pixels, click **Install StackAdapt Pixel**.
23+
24+
![Image showing location of link to install Pixel](images/install-pixel-link.png)
25+
26+
3. In the instructions that appear, copy the universal pixel ID from the code snippet. Below is an example of a code snippet where the universal pixel ID is `sqQHa3Ob1hFi__2EcYYVZg1`.
27+
28+
![Image showing location of universal pixel ID in code snippet](images/copy-pixel-id.png)
29+
30+
### Setting up the StackAdapt destination in Segment
31+
32+
1. From the Segment web app, navigate to **Connections > Catalog > Destinations**.
33+
2. Search for and select the "StackAdapt" destination.
34+
3. Click **Add Destination**.
35+
4. Select an existing source to connect to the StackAdapt destination.
36+
5. Give the destination a name.
37+
6. On the Settings screen, provide your StackAdapt Universal Pixel ID. This can be found on the Pixels page in StackAdapt as described above.
38+
7. Toggle on the destination using the **Enable Destination** toggle.
39+
8. Click **Save Change**.
40+
41+
### StackAdapt Pixel setup
42+
43+
Segment events that are forwarded to StackAdapt can be used to track ad conversions, and to generate retargeting and lookalike audiences. Please review the StackAdapt documentation for the general setup of these if you are not already familiar:
44+
45+
- [Creating Conversion Events](https://support.stackadapt.com/hc/en-us/articles/360005859214-Creating-Conversion-Events){:target="_blank"}
46+
- [Creating Retargeting Audiences](https://support.stackadapt.com/hc/en-us/articles/360005939153-Creating-Retargeting-Audiences){:target="_blank"}
47+
- [How to Generate and Target a Lookalike Audience](https://support.stackadapt.com/hc/en-us/articles/360023738733-How-to-Generate-and-Target-a-Lookalike-Audience){:target="_blank"}
48+
49+
Setup of conversion events, retargeting audiences, and lookalike audiences that fire on Segment events is largely the same as the setup in the StackAdapt documentation, with a few caveats:
50+
51+
1. You **must** select "Universal Pixel" as the pixel type. This is because the StackAdapt destination in Segment uses your Universal Pixel ID to send events to StackAdapt.
52+
2. There is no need to install the StackAdapt pixel on your website as instructed in the "Installation" step, since Segment will forward events to StackAdapt that would normally be tracked by the StackAdapt pixel.
53+
3. If you choose to set up event rules, you will need to ensure that you use the event keys supported by the the StackAdapt destination as described below.
54+
55+
### Event rules
56+
57+
The StackAdapt Segment destination sends an `action` event key which by default is mapped to the Segment event name. Creating rules on this `action` key should be sufficient for most simple event rule use cases. For example, if you fire a Segment event when a user fills out a registration form on your website and want to track this as a conversion event in StackAdapt, you can create a rule in StackAdapt that matches the `action` key with the Segment event name.
58+
59+
A Segment event fired with the code `analytics.track("User Registered")` can be tracked as a conversion event with an event rule that matches an `action` of `User Registered` as shown below:
60+
61+
![Image showing event rule in StackAdapt the matches a User Registered event](images/user-registered-event-rule.png)
62+
63+
#### Ecommerce events
64+
65+
The StackAdapt destination also supports forwarding ecommerce fields for the purpose of creating event rules that match ecommerce events, with default mappings to properties specified in the [Segment V2 Ecommerce Event Spec](/docs/connections/spec/ecommerce/v2/) as described in the below table:
66+
67+
| Segment Ecommerce Event Property | StackAdapt Event Key |
68+
|----------------------------------|----------------------|
69+
| `order_id` | `order_id` |
70+
| `revenue` | `revenue` |
71+
| `product_id` | `product_id` |
72+
| `category` | `product_category` |
73+
| `name` | `product_name` |
74+
| `price` | `product_price` |
75+
| `quantity` | `product_quantity` |
76+
77+
For events that can involve multiple products, such as checkout events, StackAdapt forwards a JSON array of product objects with a `products` key and fields that map by default to following Segment product array fields:
78+
79+
| Segment Ecommerce Event Property | StackAdapt Product Object Key |
80+
|----------------------------------|-------------------------------|
81+
| `products.$.product_id` | `product_id` |
82+
| `products.$.category` | `product_category` |
83+
| `products.$.name` | `product_name` |
84+
| `products.$.price` | `product_price` |
85+
| `products.$.quantity` | `product_quantity` |
86+
87+
For example, to create a conversion event when an order is completed with a revenue value greater than 10, you could set up an event rule matching an `action` value of `Order Completed` and a `revenue` value greater than 10 as shown below:
88+
89+
![Image showing event rule in StackAdapt the matches an Order Completed event with a revenue greater than 10](images/order-completed-event-rule.png)
90+
91+
This rule would match a Segment event fired with code such as:
92+
93+
```javascript
94+
analytics.track("Order Completed", {
95+
order_id: '50314b8e9bcf000000000000',
96+
revenue: 11.5
97+
products: [
98+
{
99+
product_id: '507f1f77bcf86cd799439011',
100+
name: 'Monopoly: 3rd Edition',
101+
price: 11.5,
102+
quantity: 1,
103+
category: 'Games'
104+
}
105+
]
106+
});
107+
```
108+
109+
### URL rules
110+
111+
If you are using URL rules, these will be matched whenever Segment sends an event to StackAdapt with a `url` matching the URL rule. This should be accomplished by the page event Segment automatically fires when a page is viewed, so setup of URL rules should be identical to setting up URL rules with the StackAdapt pixel.
112+
113+
{% include components/actions-fields.html %}
114+
115+
## Data and privacy
116+
117+
Review [StackAdapt's Data Processing Agreement](https://www.stackadapt.com/data-processing-agreement){:target="_blank"} to learn more about StackAdapt's privacy and data terms.

0 commit comments

Comments
 (0)