Skip to content
Platforms

Shopsys

How to add the Otto chat to a Shopsys store through Google Tag Manager or your agency, and how to allow it in the Content-Security-Policy header.

On this page

Shopsys Platform is a system for larger online stores, usually built and run by an agency. The admin has no field for custom code, so the agency adds the chat code through Google Tag Manager or straight into the store code, and from version 19 also allows Otto in the Content-Security-Policy header. The setup itself takes about 10 minutes.

What you need

  • An Otto account. You find the chat code in the panel under Overview, on the Installation & integrations card, on the Shopsys tile. It is under the More platforms tile, and you can also search for it.
  • Contact details for the agency or developers who run your store.
  • A superadmin account to change the Content-Security-Policy header. Regular administrators do not see the Superadmin section.
  • For the Google Tag Manager route, access to the container your store uses.

Chat code

Google Tag Manager drops data- attributes from the tags it adds, so the chat would not know its key. That is why the Shopsys tile gives you a short loader that starts the chat with its key. Click Copy code:

<script>(function(){var s=document.createElement('script');s.src='https://ottoai.sk/widget.js';s.async=true;s.setAttribute('data-otto-key','pk_vas_kluc');(document.head||document.documentElement).appendChild(s);})();</script>
The sample shows pk_vas_kluc instead of a key, the tile gives you the code with your own key. The key is not a password, you do not need to hide it. Add the code once, it covers the whole site.

Adding the code

Through Google Tag Manager

  1. In Google Tag Manager, open your store's container and click Tags, then New.
  2. Click Tag Configuration, choose Custom HTML and paste the chat code.
  3. Under Triggering, choose All Pages and save the tag.
  4. Click Submit, then Publish.
  5. On Shopsys 19 or newer, open Settings, Superadmin, Content-Security-Policy header in the admin.
  6. In the script-src part, add a space and https://ottoai.sk after the last source. If the header also has connect-src, add https://ottoai.sk wss://ottoai.sk to it the same way.
  7. Click Save changes.

Straight into the store code

  1. Send the chat code to your agency together with the ready-made email from this page.
  2. The agency adds the code to the shared store template before </body>, so it is on every page, and deploys the change.
  3. On Shopsys 19 or newer, open Settings, Superadmin, Content-Security-Policy header in the admin.
  4. In the script-src part, add a space and https://ottoai.sk after the last source. If the header also has connect-src, add https://ottoai.sk wss://ottoai.sk to it the same way.
  5. Click Save changes.

When you save the header, Shopsys clears the cached store settings by itself, so you do not need to clear the cache by hand.

The Shopsys admin recommends testing every change to the Content-Security-Policy header on a development server first. A mistake in the header can block other parts of the store too.
If the header has no connect-src part, do not add one with only Otto's addresses. It would block the other connections your store needs.

You can also follow the official Shopsys help.

Email for support

Is support, an agency or a developer adding the code for you? Send them this email and paste the chat code from the tile below it.

Hello,

please add the attached Otto chat code to every page of our Shopsys store. You can add it through Google Tag Manager as a Custom HTML tag with the All Pages trigger, or to the shared template before </body>. Please paste the code exactly as it is.

If we run Shopsys 19 or newer, please also go to Settings, Superadmin, Content-Security-Policy header and add https://ottoai.sk to script-src, and, if the header has connect-src, add https://ottoai.sk and wss://ottoai.sk to it.

Thank you.

Checking it works

  1. Open your website in a new browser window and reload. A chat bubble should pop up in the bottom right.
  2. Send the chat a test question. Otto answers within a few seconds.
  3. In the panel, under Settings, Connections, the Your website row shows the domain the chat runs on.
With Google Tag Manager, the chat appears only after the container is published.

Product catalogue

Shopsys comes with feeds for Heureka, Zboží, Google and Mergado. Their addresses are in Integrations, XML Feeds, or in Marketing, XML Feeds in older versions. The address contains a random token, so copy it whole.

Paste the feed address in the panel under Settings, Catalogue, and click Check feed. The panel tells you how many products it found, and Otto keeps the feed up to date on its own. More in Product catalogue.

Troubleshooting

I cannot see the Superadmin section

Only a superadmin account sees Superadmin, and your agency usually has it. Send them the email from this page and they will update the header for you.

The console says Content-Security-Policy blocks widget.js

https://ottoai.sk is missing from script-src. Add it in Settings, Superadmin, Content-Security-Policy header and click Save changes.

The console reports a blocked connection to wss://ottoai.sk

The default Shopsys 19 header has no connect-src, so connections fall under default-src, which may not allow wss://. Add connect-src with the same sources as default-src, plus wss://ottoai.sk.

The tag is published in Tag Manager, but the chat does not appear

Paste the code into Tag Manager exactly as the Shopsys tile shows it. Tag Manager breaks the plain line with the data-otto-key attribute, and the chat would not know its key.

Also check

  • Reload the page without cache with Ctrl+F5, or open it in a private window.
  • The code should be on the page only once, a second copy is ignored.
  • A cookie consent bar can block scripts until the visitor agrees. If the chat only shows up after consent, see Cookie consent.
  • If your site sends a Content-Security-Policy header, allow https://ottoai.sk in it, as shown in Content-Security-Policy.
  • In the browser console (F12), look for messages starting with [Otto]. They tell you what the chat is missing.
  • Still nothing? Write to us at podpora@ottoai.sk and include your website address.

Removing the chat

Delete the chat tag in Google Tag Manager and publish the container again, or ask your agency to remove the code from the template. You can then also remove https://ottoai.sk from the Content-Security-Policy header.