All TalkersCode Topics

Follow TalkersCode On Social Media - A Social Media Network for developers Join Now ➔

How Do You Add Embedded Analytics Into Your Application

Last Updated On Sunday, Apr 9, 2023 | Written By - Mudit Jain


How Do You Add Embedded Analytics Into Your Application

While we previously covered 40 ways to improve website traffic on TalkersCode, it should be iterated that these methods will not matter if you don’t have analytics to begin with.

Analytics is a vital tool that collects data about how users interact with your website, giving you the information needed to optimize and improve your operations.

Most website owners utilize standalone analytics or analytics that are accessed through a separate application. A great example of this is the free tool Google Analytics.

For this post however, we will be delving into embedded analytics and what benefits it provides for your business.

Let’s get started.

What is Embedded Analytics?

Compared to standalone analytics, embedded analytics is a tool integrated into an application, removing the need to switch to another platform to review data. Information can be accessed through interactive dashboards and detailed reports.

When developed properly, embedded analytics becomes part of a business’ natural workflow. The technology enables real-time insights, data visualization, and interactive reporting.

Simply put, insights will appear in areas where users would need them. This is why embedded analytics is typically used for sales-driven applications, like a customer relationship management (CRM) system.

What are the Benefits of Embedded Analytics?

The post ‘What is Embedded Analytics’ by MongoDB provides a good overview of what businesses can gain from using embedded analytics.

In a nutshell, embedded analytics can help you make strategic decisions and give you a competitive advantage.

With embedded analytics, business users can easily access data to understand customer behavior patterns. The insights from these reports can help them make informed decisions and create personalized experiences.

Personalization has become necessary in today’s business landscape due to increasing customer demand. Epsilon research shows that 80% of customers are more likely to purchase from businesses that offer tailored experiences.

Industries That Benefit from Embedded Analytics

Industries of all types have experienced the benefits of incorporating embedded analytics into their business processes. A few examples will be mentioned below.

The retail industry is leading in terms of embedded analytics adoption. But other industries are taking a page from their book. A report published by PYMNTS reveals several platform deals between big retail brands and healthcare companies, like Walmart and UnitedHealth Group.

Embedded analytics is also one of the innovations revolutionizing the financial services industry. The technology helps streamline bank processes by providing real-time data.

Telecommunications companies are also using embedded analytics to stay ahead of the curve. Data gathered from the technology helps them offer personalized deals to customers.

How to Integrate Analytics Into Your Application

Developers looking to integrate analytic capabilities can utilize embedded analytics software. Examples include MongoDB, Tableau, and Sisense.

For this tutorial, we will be using MongoDB.

If you want to embed charts or dashboards using iFrame, here’s how.

<iframe style="background: #FFFFFF;border: none;border-radius: 2px;box-shadow: 0 2px 10px 0 rgba(70, 76, 79, .2);" width="640" height="480" src=""> </iframe>

More customization options are available if you use MongoDB’s software development kit (SDK) to embed your charts and dashboards. You can add features like dynamic filters and style.

import "regenerator-runtime/runtime";
import $ from "jquery";
import ChartsEmbedSDK from "@mongodb-js/charts-embed-dom";
async function renderChart() {
const sdk = new ChartsEmbedSDK({
baseUrl: ""
const chart = sdk.createChart({
chartId: "CHARTID#"
await chart.render(document.getElementById("chart"));
$("#refresh").on("click", () => {
$("#my-filter").on("change", e => {
const country =;
? chart.setFilter({ "filter-field": country })
: chart.setFilter({});
renderChart().catch(e => window.alert(e.message));

Embedding a click event handler is also possible if you want to include interactive experiences in your charts and dashboards. See the guide below.

import ChartsEmbedSDK from "@mongodb-js/charts-embed-dom";
const sdk = new ChartsEmbedSDK({
baseUrl: "", // Optional: ~REPLACE~ with the Base URL from your Embed Chart dialog
const chart1 = sdk.createChart({
chartId: "CHARTID#", // Optional: ~REPLACE~ with the Chart ID from your Embed Chart dialog
height: "700px",

Codes may differ depending on the software you use. Do your due diligence during the research stage before picking a platform for your analytics needs.

Recommended Articles

40 Proven Ways To Increase Your Website Traffic (In 2023)So in this article which is based on how to increase your website traffic i am listing 40 proven ways which i used to generate and increase my website and get over 100,000 visitors every month on this...

Tags - Increase Website Traffic | Published On - 9 Apr 2023

How To Start A Blog (In 2023) - InDepth GuideHow to start a blog? This is the most asked question in blogging field. So do you want to start a blog. Ask these simple questions before jumping to the below article. Do you have a passion f...

Tags - Blogging | Published On - 9 Apr 2023

10 Ways To Increase Organic Traffic (In 2023)Every blogger or webmaster always wanted to increase atleast one thing and that is their website traffic. This is the most precious thing a website or blog could ever have. Imagine you continuou...

Tags - Increase Website Traffic | Published On - 9 Apr 2023

Proven Ways To Increase Social Media Traffic (In 2023)Social Media is one of the best source of marketing you can reach to billions of people from around the world. Every second person on the earth is atleast active on 1 social media. So imagine ho...

Tags - Increase Website Traffic | Published On - 9 Apr 2023

5 Ways To Make Money Online Through Blogging (In 2023)Do you also want to make money online through blogging? Let me clear this things that making money online is not an easy task many people thought. It's like any other way to earn money but in ...

Tags - Make Money Online | Published On - 9 Apr 2023