How to install
Installing Rosetta.ai service is easy. You have 2 choices to make it.
Last updated
Was this helpful?
Installing Rosetta.ai service is easy. You have 2 choices to make it.
Last updated
Was this helpful?
If you want to customize the product recommenders in your UI, and you just need the product recommendation data, then you don't need to use our Plugin component, and Option 1 is your option!
Import SDK v1.0 file in your website.
Just paste the following snippet into the <head>
tag of all the pages in your website where you want to use the SDK, and.... you are done with the installation!!! 🎉
This is your option when you don't want to develop the recommendation boxes, and you just want to use our great Plugin (UI component for showing recommended products).
IMPORTANT: The plugin file already include all the SDK functions, so DO NOT import the SDK file and the plugin file at the same time. If you have imported the SDK file, please remove it.
● Import the file by yourself
Insert the code below into the <head>
tag of the website
* Remember to replace the {{appId}} with your own app ID.
● Import the file by webapp (through GTM)
Go to the settings page in Web App and click the Authenticate with GTM
button in Configuration.
The plugin file will help you initialize the whole settings. You could start using the SDK command after the service is initialized.
If the service has initialized, the variable rosettaData
in the window will be valuable; If it hasn't initialized, it would be undefined
. However, you could insert a value to the key onCallback
into window.rosettaData
. Once the service is initialized, it will run onCallback
in window.rosettaData
automatically.
You can write down your commands or somethig you want to do after the Rosetta service initialized into onRosettaCallback
function to make sure it will be run when the service is ready by the code below.
Authenticate with GTM
button