--- title: "How to Embed Analytics in an App" slug: "how-to-embed-analytics-in-an-app" updated: 2024-01-05T16:25:50Z published: 2024-01-05T16:25:50Z canonical: "support.tulip.co/how-to-embed-analytics-in-an-app" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.tulip.co/llms.txt > Use this file to discover all available pages before exploring further. # 如何在应用程序中嵌入分析功能 ## 概述 *下面介绍如何在应用程序中加入分析。* 让用户使用 Tulip 平台的最佳方式之一,就是向他们提供有关车间情况的数据驱动型信息。 实现这一目标的一个好方法是将分析嵌入应用程序,这样用户就可以看到分析并与之互动,而无需转头去看仪表盘。 另外,您还可以[创建一个交互式车间仪表板应用程序](https://support.tulip.co/docs/how-to-create-your-first-shop-floor-dashboard),可在车间或[手机](https://support.tulip.co/docs/setting-up-the-tulip-mobile-app)上使用。 ## 在应用程序中嵌入分析 要在应用程序的某个步骤中嵌入分析,请按照以下步骤操作: 1- 从工具栏中选择 "*嵌入*",然后从下拉列表中选择 "*分析*"。这将创建一个空的嵌入式分析 Widget。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_92862480.png) 2- 选择分析 Widget,选择要嵌入的分析。 您可以选择[创建新的分析](https://support.tulip.co/docs/how-to-create-a-new-analysis),也可以选择已经创建的分析。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_92862616.png) ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_221510107.png) 在分析 Widget 的**上下文窗格**中,您可以像其他 Widget 一样更改分析的大小和背景颜色。此外,您还可以自定义分析标题,并切换显示每个图表的*最后更新*时间。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_92862734.png) ## 动态过滤嵌入式分析 选择分析后,就可以添加动态筛选器。 这意味着您可以根据变量、表记录、机器输出等更改分析中显示的数据。 动态分析支持以下数据类型: - 文本 - 数字 - 整数 - 布尔型 - 时间间隔 - 时间 - 用户 - 站 - 机器 这些将在分析生成器的 "上下文窗格 "底部操纵 "过滤器 "部分。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_221517961.png) ### 设置 在 "上下文窗格 "中,选择 "过滤器 "选项旁边的铅笔。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_205539021.png) 然后开始添加过滤器。这些过滤器将在每次运行应用程序时更改分析中显示的数据。 ### 示例:当前操作员统计当前操作员统计 操作员可能只需要查看自己的性能。在这种情况下,可以将分析设置为仅筛选登录用户。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_205539461.png) - "用户""等于""变量""登录用户" ### 应用程序分析过滤器 - 用户 - 站点 - 开始时间 - 日期 - 日期和时间 - 轮班时间 - 小时 - 流程周期时间 - 该程序中的所有表单输入 - 该程序中的所有变量 ### 表格分析过滤器 - 该表的所有字段 ### 机器分析过滤器 - 机器 - 开始时间 - 结束时间 - 持续时间 - 程序 - 零件数 - 缺陷计数 - 每小时零件数 - 正常运行时间 - 停机时间 ## 技术细节 :::(Info) (注)分析默认设置为每 60 秒刷新一次。当嵌入到应用程序中时,您可以选择缩短持续时间,这样您就可以看到发生的变化: 要缩短持续时间,请编辑分析并更改 "*共享*"菜单下的 "*刷新秒数*"。刷新秒数至少为 5 秒。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Embed%20Analytics%20in%20an%20App_75011938.png) ## 更多阅读 - [创建交互式车间仪表板应用程序](https://support.tulip.co/docs/how-to-create-your-first-shop-floor-dashboard) - [设置第一个机器分析](https://support.tulip.co/docs/using-machine-data-in-the-analytics-editor) - [设置表格数据分析](https://support.tulip.co/docs/how-to-create-table-based-analytics) --- 找到您想要的了吗? 您还可以前往[community.tulip.co](https://community.tulip.co/?utm_source=intercom&utm_medium=article-link&utm_campaign=all)发布您的问题,或查看其他人是否遇到过类似问题!