SDK examples
A thin pointer to the full Apex SDK reference for install, runtime API, React bindings, and InitConfig.
The full SDK reference now lives in the SDK reference section. Start there for the current install snippet, npm package usage, InitConfig table, runtime API, React bindings, feature flags, and migration notes.
Install snippet
html
<!-- Add before your closing </head> tag -->
<script>
window.Drip=window.Drip||{q:[],init(c){this.q.push(["init",c])},track(e,p){this.q.push(["track",e,p])}}
</script>
<script async src="https://sdk.drip-apex.com/drip.js"></script>
<script>
Drip.init({
shopId: "shop_uuid",
endpoint: "https://events.drip-apex.com"
})
</script>Track an event
js
Drip.track("add_to_cart", {
product_id: "gid://shopify/Product/123",
value: 49.00,
currency: "EUR"
});Runtime config
http
GET /api/exp?shopId=shop_uuid
{
"experiments": [...],
"profile": { ... },
"runtime": { ... },
"signals": [...],
"delivery": { ... }
}