JavaScript Integration

Seamlessly integrate the Neocom Product Advisor on your website using JavaScript.

The JavaScript integration allows you to easily launch the Neocom Product Advisor from any element on your website. Whether it’s buttons, images, banners, or other elements – with a simple click, you can open the advisor in a modal window overlaying your site.

02 Javascript trigger-DE

How the Integration Works

To implement the integration, simply add a callback function to the desired element. In the example code below, the integration is achieved through a button:

<button onclick="Neocom.openAdvisorInModal('YOUR_PROJECT_ID')">Open Advisor</button>

Important: Note that the Project ID used here is different from the Client ID in the Global Embed Code. You can find the Project ID in the Admin Portal under the Integration section.

Use Cases for JavaScript Integration

The JavaScript integration is the most versatile method Neocom offers. It allows you to place the advisor trigger behind any element on your site. When a user clicks the element, the advisor opens in a modal window. This method is ideal for prominently positioning the product advisor across your website.

Examples of Integration:

  • Homepage: Place a trigger in a banner to engage visitors right from their first impression of your site.
  • Category Pages: Offer the advisor as visitors browse specific categories to provide targeted recommendations.
  • Product Detail Pages (PDP): Provide access to the advisor when visitors view a specific product in detail.

Use Case: Bike Shop

Consider a bike shop example: You could implement two banners – one on the homepage and one on the product detail page. These banners could open the advisor, ensuring that every visitor to your site has a clear opportunity for personalized advice. This is similar to retail practice where staff engage customers upon entering the store and again when looking at specific products.

By designing these two banners, you offer visitors two different yet direct paths to advice – a double chance for engagement, tailored to their stage in the customer journey. This integration ensures your product advisor is always available at the right time and place, maximizing conversion rates and enhancing your customers' shopping experience.