Platform
Shopify
Shopify mağazanıza OnsraChat widget'ını ekleyin.
theme.liquid Dosyasına Ekleyin
1
Shopify Yönetici Paneli → Online Store → Themes sayfasına gidin
2
Temanızın yanındaki "Actions" → "Edit code" seçeneğine tıklayın
3
Sol menüden "Layout" → "theme.liquid" dosyasını açın
4
</body> etiketinden önce kodu yapıştırın ve kaydedin
liquid
{% comment %} OnsraChat Widget {% endcomment %}
<script>
window.OnsraSettings = {
widgetId: "YOUR_WIDGET_ID",
{% if customer %}
visitor: {
name: "{{ customer.name | escape }}",
email: "{{ customer.email | escape }}",
userId: "{{ customer.id }}",
tags: "{{ customer.tags | escape }}",
},
{% endif %}
};
</script>
<script src="https://widget.onsrachat.com/loader.js" async></script>
</body>Sipariş Takibi
Müşteri sipariş durumunu widget üzerinden takip edebilir:
liquid
{% if order %}
<script>
window.OnsraChat.track("order_viewed", {
orderId: "{{ order.order_number }}",
status: "{{ order.financial_status }}",
total: {{ order.total_price }},
});
</script>
{% endif %}Not: Shopify Plus kullanıcıları checkout sayfasında da widget ekleyebilir. Bunun için Checkout scripts kullanmanız gerekir.