How can we help you?

Implementing and launching bluebarry's main advisor script

Jump to a topic 👇🏻

This guide will help you add the Bluebarry advisor to your website. By following these steps, you’ll be able to:

  • Add the main Bluebarry script to your website
  • Create buttons or banners that open specific advisors
  • Ensure everything works correctly on your pages

Step 1: Adding the Main Script

First, locate your Tenant ID, and then add the main Bluebarry script to the <head> section of your website.

1. Find your Tenant ID:

  1. Go to “Integrations” in your bluebarry dashboard
  2. Look for your Tenant ID at the top of the page
  3. Click on it to copy
copy-tenant-id-docs

2A. Adding the script hard coded on your website

Copy bluebarry’s main script provided below, and paste it into the <head> section of the HTML on the specific page where you want to implement your advisor.

💡 Remember to replace TENANT_ID_HERE with your actual Tenant ID.

				
					
				
			

2B. Adding the script by using Google Tag Manager

You can add the main script using Google Tag Manager (GTM). However, we do not recommend this approach. Ad blockers often block GTM from loading entirely. As a result, your advisor script will not be added, and your advisor will not be launched. This leads to a poor user experience.

If you still want to proceed, or you just want to test out your advisor, make sure to follow the steps below.

1) Copy the script and replace “TENANT_ID_HERE” with your actual Tenant ID.

2) Create a new tag

3) In the “tag configuration”, choose “Custom HTML”

custom-html

4. Add your bluebarry script from the first step.

html script tagmanager

5. Add a trigger. You can either choose to trigger this tag on “all pages” or create a new trigger specifically for the page where you want to add your bluebarry Advisor.

Step 2: Adding Advisor Buttons

To make sure you’re able to launch a bluebarry advisor once you’ve clicked on it, it’s necessary to add a simple line of code to the buttons or banners that need to open the specific advisors:

1. Find your advisor ID

  • Open the advisor you want to use
  • Look in the URL of the opened advisor
  • Copy the ID (don’t include any forward slashes)
Copy advisor ID

2. Add the onclick function to your button or banner:

Button implementation code 👇🏻.
				
					onclick="barry.openAdvisor('ADVISOR_ID_HERE')">Open Advisor
				
			

💡 Remember to replace ADVISOR_ID_HERE with your actual Advisor ID.

Important notes

  • Make sure the bluebarry script is implemented on any page where you want to use advisor buttons
  • The button or banner must be on the same page where the bluebarry script is running.

Related articles

Need help?

Email us at support@bluebarry.ai!