Dynamic Yield
Datafly Signal sends Dynamic Yield events server-side through the Experience API: cart, purchase, wishlist, search and filter events and the identification events, for personalisation, recommendations and affinity.
Why route Dynamic Yield through Datafly Signal
- Events arrive when the browser cannot send them. Server-side delivery is not stopped by ad blockers, tracking prevention or a page unload.
- No plaintext personal data. Identification events carry the SHA-256 of the email as the CUID.
Prerequisites
- A Dynamic Yield Server Side API key.
- The Dynamic Yield script on the site, and Signal capturing
_dyid(dyid),_dyid_server(dyid_server) and_dyjsession(dyjsession).
Configuration
| Field | Required | Description |
|---|---|---|
api_key | Yes | Your Dynamic Yield Server Side data source API key. Generate it in the Dynamic Yield admin under Settings > API Keys (type: Server Side). Sent on every request as the DY-API-Key header. Do not use a client/section key. |
active_cookie_consent | No | Turn on only when Dynamic Yield’s active cookie consent mode is enabled for the site. Signal then sends user.active_consent_accepted from the visitor’s marketing consent. Dynamic Yield asks for the attribute only in that mode. |
Configure in Signal
Add the integration
Go to Integrations > Add Integration > Dynamic Yield.
Choose a preset
Ecommerce / Retail, Financial Services or Insurance.
Enter the configuration
Fill in the fields in the table above.
Select consent categories
Choose the categories that gate personalisation. Turn on Active cookie consent only when Dynamic Yield’s active consent mode is enabled.
Save
Signal delivers the next matching event.
API Endpoint
POST https://dy-api.com/v2/collect/user/event (EU: https://dy-api.eu/v2/collect/user/event)
DY-API-Key: API_KEY
Content-Type: application/jsonBody: user, session, context and one event in events.
Identity Signals
| Signal | Sent as | Notes |
|---|---|---|
| Dynamic Yield user id | user.dyid / user.dyid_server | From the _dyid cookies. An event with neither is not sent. |
| Session | session.dy | From _dyjsession; empty for a new session. |
| CUID | events[].properties.cuid | SHA-256 of the trimmed, lower-cased email, with cuidType he. |
Event Mapping
Ecommerce / Retail preset (ecommerce)
The Dynamic Yield e-commerce events a section needs for personalisation, recommendations and affinity: Add to Cart and Remove from Cart (value, productId, quantity), Sync Cart and Purchase (value, cart of productId, quantity and itemPrice, uniqueTransactionId), Add to Wishlist, Keyword Search, Filter Items, and the identification events Signup, Login, Identify User and Newsletter Subscription (join_group with group_id newsletter). Currency is upper-cased. Identity is the Dynamic Yield user id from the _dyid / _dyid_server cookies (collected_ids.dyid, collected_ids.dyid_server) and the session from _dyjsession (collected_ids.dyjsession); an event with no Dynamic Yield user id is not sent, because the Experience API cannot attribute it. Identification events carry the SHA-256 of the trimmed, lower-cased email as cuid with cuidType he; no plaintext personal data is sent. The visitor IP goes in context.device.ip for geo targeting. Set Active cookie consent on the integration when Dynamic Yield’s active consent mode is on, to send user.active_consent_accepted. Page views are not sent: the Dynamic Yield script reports them, and the event endpoint has no page view.
| Signal event | Sent as | Enabled |
|---|---|---|
add_to_cart | Add to Cart | Yes |
remove_from_cart | Remove from Cart | Yes |
view_cart | Sync Cart | Yes |
purchase | Purchase | Yes |
add_to_wishlist | Add to Wishlist | Yes |
search | Keyword Search | Yes |
products_filtered | Filter Items | Yes |
sign_up | Signup | Yes |
login | Login | Yes |
identify | Identify User | Yes |
join_group | Newsletter Subscription | Yes |
Financial Services preset (finance)
Dynamic Yield’s financial-institution events: Application (application_started, schema add-to-cart-v1 with the product type as productId) and Submission (application_submitted, schema purchase-v1 with a one-line cart), which Dynamic Yield requires for financial sections, plus the identification events. Identity is the Dynamic Yield user id from the _dyid / _dyid_server cookies (collected_ids.dyid, collected_ids.dyid_server) and the session from _dyjsession (collected_ids.dyjsession); an event with no Dynamic Yield user id is not sent, because the Experience API cannot attribute it. Identification events carry the SHA-256 of the trimmed, lower-cased email as cuid with cuidType he; no plaintext personal data is sent. The visitor IP goes in context.device.ip for geo targeting. Set Active cookie consent on the integration when Dynamic Yield’s active consent mode is on, to send user.active_consent_accepted. Page views are not sent: the Dynamic Yield script reports them, and the event endpoint has no page view.
| Signal event | Sent as | Enabled |
|---|---|---|
application_started | Application Started | Yes |
application_submitted | Submission | Yes |
sign_up | Signup | Yes |
login | Login | Yes |
identify | Identify User | Yes |
join_group | Newsletter Subscription | Yes |
Insurance preset (insurance)
Insurance journeys on a Dynamic Yield financial-institution section: a quote request is an Application (add-to-cart-v1, productId the insurance type or first item) and a bought policy a Submission (purchase-v1 with the policy and add-ons as the cart, uniqueTransactionId the policy number), plus the identification events. Identity is the Dynamic Yield user id from the _dyid / _dyid_server cookies (collected_ids.dyid, collected_ids.dyid_server) and the session from _dyjsession (collected_ids.dyjsession); an event with no Dynamic Yield user id is not sent, because the Experience API cannot attribute it. Identification events carry the SHA-256 of the trimmed, lower-cased email as cuid with cuidType he; no plaintext personal data is sent. The visitor IP goes in context.device.ip for geo targeting. Set Active cookie consent on the integration when Dynamic Yield’s active consent mode is on, to send user.active_consent_accepted. Page views are not sent: the Dynamic Yield script reports them, and the event endpoint has no page view.
| Signal event | Sent as | Enabled |
|---|---|---|
quote_requested | Application Started | Yes |
policy_purchased | Submission | Yes |
purchase | Submission | Yes |
sign_up | Signup | Yes |
login | Login | Yes |
identify | Identify User | Yes |
join_group | Newsletter Subscription | Yes |
To customise, edit the integration’s Field Mappings in the Management UI.
Example: a purchase
What Signal sends (rendered from the preset):
POST https://dy-api.com/v2/collect/user/event{
"context": {
"channel": "WEB",
"device": {
"ip": "203.0.113.7"
}
},
"events": [
{
"name": "Purchase",
"properties": {
"cart": [
{
"itemPrice": 129.99,
"productId": "SKU-1",
"quantity": 2
},
{
"itemPrice": 20,
"productId": "SKU-2",
"quantity": 1
}
],
"currency": "GBP",
"dyType": "purchase-v1",
"uniqueTransactionId": "T-1001",
"value": 279.98
}
}
],
"session": {
"dy": ""
},
"user": {
"dyid": "-4350463893986789401",
"dyid_server": "-4350463893986789401"
}
}Testing
Send a test event
Trigger the event on your site, or replay one from Signal’s event debugger.
Check the response
Confirm a 2xx response, then check the event in Dynamic Yield’s event explorer.
Troubleshooting
| Problem | Solution |
|---|---|
| Purchase not recorded | Purchases need items[] with item_id, price and quantity. |
| 401 | Use a Server Side API key. |
Limitations
- Page views are not sent: the Dynamic Yield script reports them. API-only sections need the pageview endpoint, which Signal does not call.
- Sort Items is not sent: Dynamic Yield accepts it from the script only.
- EU data-centre accounts need the
euendpoint variant, which a preset cannot yet select from configuration (#1543).