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

FieldRequiredDescription
api_keyYesYour 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_consentNoTurn 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.

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/json

Body: user, session, context and one event in events.

Identity Signals

SignalSent asNotes
Dynamic Yield user iduser.dyid / user.dyid_serverFrom the _dyid cookies. An event with neither is not sent.
Sessionsession.dyFrom _dyjsession; empty for a new session.
CUIDevents[].properties.cuidSHA-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 eventSent asEnabled
add_to_cartAdd to CartYes
remove_from_cartRemove from CartYes
view_cartSync CartYes
purchasePurchaseYes
add_to_wishlistAdd to WishlistYes
searchKeyword SearchYes
products_filteredFilter ItemsYes
sign_upSignupYes
loginLoginYes
identifyIdentify UserYes
join_groupNewsletter SubscriptionYes

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 eventSent asEnabled
application_startedApplication StartedYes
application_submittedSubmissionYes
sign_upSignupYes
loginLoginYes
identifyIdentify UserYes
join_groupNewsletter SubscriptionYes

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 eventSent asEnabled
quote_requestedApplication StartedYes
policy_purchasedSubmissionYes
purchaseSubmissionYes
sign_upSignupYes
loginLoginYes
identifyIdentify UserYes
join_groupNewsletter SubscriptionYes

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

ProblemSolution
Purchase not recordedPurchases need items[] with item_id, price and quantity.
401Use 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 eu endpoint variant, which a preset cannot yet select from configuration (#1543).