How to add Orka on your Shopify app
Orka Chat Integration Documentation for Shopify
This documentation explains how to integrate the Orka chat widget into your Shopify application. Choose the integration method based on your development framework.
👉Click here if you want to see how to add Orka Live chat if you've built your Shopify app using Remix
👉Click here if you have not used Remix
Integration with Remix
If you built your application with Remix, you have two integration options:
Option 1: Using npm package (Recommended)
This approach uses Orka's official npm package and provides better integration with Remix.
Install the package via npm:
Create a new
OrkaChat.tsx
component:
Integrate the component in your pages:
Option 2: Script Integration
This approach uses the script directly in your root.tsx
file.
Add the script to your
App
component inroot.tsx
:
Standard Integration (Without Remix)
If you're not using Remix, you have several options for integrating the Orka widget:
Basic Integration
Add the following script to the <head>
section of your HTML:
Auto-Loading Configuration
By default, the widget loads automatically when the script is included. You can prevent this automatic loading by setting the ORKA_LOAD option to false:
If you disable auto-loading, you'll need to initialize the widget manually:
YOUR_APP_ID
: Replace with your application IDappType
: (Optional) Specify "Shopify" or "Standalone"
Single Page Application Integration
If you're using a Single Page Application (SPA), you can use the npm package:
Install the package:
Initialize the widget:
Session Configuration
You can configure session data for any integration method:
Important: Insert the ORKA_SESSION configuration before the main Orka script.
API Methods
update(data)
Updates the session data for the chat widget.
reset()
Resets the chat session and updates context information.
Closes the current chat
Sends the current page's title and URL as context
toggle()
Toggles the widget visibility.
show(message)
Opens the chat widget with an optional pre-filled message.
hide()
Closes the chat widget.
destroy()
Removes the widget instance from the page.
Complete Integration Example
Here's a full example showing how to integrate the widget with various features:
Troubleshooting
Common Issues
Widget not loading:
Verify that the SDK script URL is correct
Check that your APP_ID is valid
Ensure the script is loaded after the DOM
Check if auto-loading is disabled (ORKA_LOAD = false)
API calls failing:
Check the browser console for errors
Make sure the widget is fully initialized before calling methods
Verify that methods are called after DOM content is loaded
Last updated