├── LICENSE ├── README.md ├── README_ZH.md ├── hmsanalyticskitdemo-start ├── .gitignore ├── babel.config.js ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ ├── css │ │ │ └── global.css │ │ └── img │ │ │ ├── setting.png │ │ │ └── up.png │ ├── components │ │ ├── AnswerDemo.vue │ │ ├── Result.vue │ │ └── Settings.vue │ ├── eventBus.js │ ├── main.js │ └── router.js └── vue.config.js ├── hmsanalyticskitdemo ├── .gitignore ├── babel.config.js ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ ├── css │ │ │ └── global.css │ │ └── img │ │ │ ├── setting.png │ │ │ └── up.png │ ├── components │ │ ├── AnswerDemo.vue │ │ ├── Result.vue │ │ └── Settings.vue │ ├── eventBus.js │ ├── main.js │ └── router.js └── vue.config.js └── screenshot ├── screen_0.PNG └── screen_1.PNG /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | 3 | Version 2.0, January 2004 4 | 5 | http://www.apache.org/licenses/ 6 | 7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 8 | 9 | 1. Definitions. 10 | 11 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 16 | 17 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 18 | 19 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 20 | 21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 22 | 23 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 24 | 25 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 26 | 27 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 28 | 29 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 30 | 31 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 32 | 33 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 34 | 35 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 36 | 37 | You must give any other recipients of the Work or Derivative Works a copy of this License; and 38 | You must cause any modified files to carry prominent notices stating that You changed the files; and 39 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 40 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 41 | 42 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 43 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 44 | 45 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 46 | 47 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 48 | 49 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 50 | 51 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. 52 | 53 | END OF TERMS AND CONDITIONS -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HMS AnalyticsKit Demo for Javascript 2 | 3 | [![hms](https://img.shields.io/badge/hms-analytics-brightgreen)](https://developer.huawei.com/consumer/en/doc/development/HMS-References/3021004) 4 | 5 | English | [中文](README_ZH.md) 6 | 7 | ## Table of Contents 8 | 9 | * [Introduction](#introduction) 10 | * [Getting Started](#getting-started) 11 | * [Installation](#installation) 12 | * [Configuration ](#configuration ) 13 | * [Environment requirements](#environment-requirements) 14 | * [Result](#result) 15 | * [License](#license) 16 | 17 | 18 | ## Introduction 19 | HmsAnalyticsKitDemo is a web client that applying HUAWEI Hianalytics SDK used for showing how to collect user engagement and user preference. 20 | [Read more about Hianalytics](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/introduction-0000001050745149). 21 | 22 | ## Getting Started 23 | 24 | For more development guidance, please refer to the links below: 25 | 26 | [Development Guide](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/introduction-0000001050745149). 27 | 28 | [API References](https://developer.huawei.com/consumer/en/doc/development/HMSCore-References/javascript-api-huawei-analytics-overview-0000001051065713). 29 | 30 | We also provide an example to demonstrate the use of analytics SDK for Web. 31 | 32 | This sample uses the npm package manager. 33 | 34 | First download the demo by cloning this repository or downloading an archived snapshot. 35 | 36 | In VS Code, use the "File -> Open Folder", and select the directory of "analytics-demo". 37 | 38 | We provide two demos: 39 | 40 | 1. hmsanalyticskitdemo: this is a completed code for the sample app 41 | 2. hmsanalyticskitdemo-start: this is a starting code that you'll build upon during this codelab. 42 | 43 | 44 | You can switch to the hmsanalyticskitdemo directory, use the command `npm install` to install the dependencies, then run command `npm run dev` to run the project directly. 45 | 46 | You should create an app in AppGallery Connect, and obtain the project configuration then copy to your web project.[Development Process](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/javascript-dev-process-0000001051145662). 47 | 48 | 49 | ## Installation 50 | 1. Use VS Code to open the decompressed project 51 | 2. Switch to the right demo directory, use the command `npm install` to install the dependencies. 52 | 3. After the configuration is complete, run `npm run dev` to start the demo project. 53 | 54 | 55 | ## Configuration 56 | Create a web app in AppGallery Connect and obtain the project configuration, then copy it to your web project. 57 | 58 | ## Environment requirements 59 | Hardware requirements: 60 | 1. A computer 61 | 2. A browser, such as Chrome 62 | 63 | 64 | Software requirements: 65 | 1. The IDE/text editor such as [VS Code](https://code.visualstudio.com) or [WebStorm](https://www.jetbrains.com/webstorm/) 66 | 2. The package manager [npm](https://www.npmjs.com) , which typically comes with [Node.js](https://nodejs.org/en) 67 | 3. The codelab's sample code 68 | 4. A terminal/console 69 | 70 | ## Result 71 | After running the app you should see a screen like this: 72 | 73 | 74 | 75 | Click the button TRUE or FALSE to answer the question; Click POST SCORE, log the score user got. All the infomations will be upload to Hianalytics, and you can see these infomations in real time using Real-time. 76 | 77 | Click button SETTINGS: 78 | 79 | 80 | 81 | You will be asked what your favorite sport is. This choice will be logged to Hianalytics as a User Property. 82 | 83 | ## Question or issues 84 | If you want to evaluate more about HMS Core, 85 | [r/HMSCore on Reddit](https://www.reddit.com/r/HuaweiDevelopers/) is for you to keep up with latest news about HMS Core, and to exchange insights with other developers. 86 | 87 | If you have questions about how to use HMS samples, try the following options: 88 | - [Stack Overflow](https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Votes) is the best place for any programming questions. Be sure to tag your question with 89 | `huawei-mobile-services`. 90 | - [Huawei Developer Forum](https://forums.developer.huawei.com/forumPortal/en/home?fid=0101187876626530001) HMS Core Module is great for general questions, or seeking recommendations and opinions. 91 | 92 | If you run into a bug in our samples, please submit an [issue](https://github.com/HMS-Core/hms-analytics-demo-javascript/issues) to the Repository. Even better you can submit a [Pull Request](https://github.com/HMS-Core/hms-analytics-demo-javascript/pulls) with a fix. 93 | 94 | ## License 95 | HmsAnalyticsKitDemo is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). 96 | -------------------------------------------------------------------------------- /README_ZH.md: -------------------------------------------------------------------------------- 1 | # 华为分析服务JavaScript SDK示例代码 2 | 3 | [![hms](https://img.shields.io/badge/hms-analytics-brightgreen)](https://developer.huawei.com/consumer/en/doc/development/HMS-References/3021004) 4 | 5 | 中文 | [English](README.md) 6 | 7 | ## 目录 8 | 9 | * [简介](#简介) 10 | * [快速入门](#快速入门) 11 | * [安装](#安装) 12 | * [配置](#配置) 13 | * [环境要求](#环境要求) 14 | * [操作结果](#操作结果) 15 | * [授权许可](#授权许可) 16 | 17 | 18 | ## 简介 19 | HmsAnalyticsKitDemo提供了web应用集成华为Hianalytics SDK的示例代码。其演示了如何通过收集预定义事件和自定义事件以提高用户参与度和用户偏好。 20 | [了解更多有关Hianalytics的信息](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/introduction-0000001050745149) 21 | 22 | ## 快速入门 23 | 24 | 更多开发指导,请参考以下链接文档: 25 | 26 | [开发指南](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/introduction-0000001050745149) 27 | 28 | [API参考](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-References/javascript-api-huawei-analytics-overview-0000001051065713) 29 | 30 | 此外,为帮助您更好理解如何使用分析服务,我们提供了一个集成面向web应用的分析服务SDK的示例。 31 | 32 | 该示例使用npm包管理器。 33 | 34 | 具体方法如下: 35 | 首先,通过克隆此仓库或下载压缩包的方式来下载demo。 36 | 37 | 在VS Code中,选择“File > Open Folder”菜单,然后选择analytics-demo所在目录。 38 | 39 | 该示例共包含两个demo: 40 | 1. hmsanalyticskitdemo:示例应用的完整代码 41 | 2. hmsanalyticskitdemo-start:本codelab中编译所依赖的启动代码 42 | 43 | 其次,您可以切换到hmsanalyticskitdemo所在目录,运行npm install命令安装依赖;然后运行npm run dev命令直接运行项目。 44 | 45 | 您需要在AppGallery Connect中创建应用,获取项目配置,并将项目配置添加到您的web项目。 46 | [进一步了解开发流程](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/javascript-dev-process-0000001051145662) 47 | 48 | 49 | ## 安装 50 | 1. 使用VS Code打开压缩项目。 51 | 2. 切换到demo所在路径,运行npm install命令安装依赖。 52 | 3. 配置完成后,运行npm run dev命令启动demo工程。 53 | 54 | 55 | ## 配置 56 | 在AppGallery Connect中创建应用,获取项目配置,并将项目配置添加到您的web项目。 57 | 58 | ## 环境要求 59 | 硬件要求: 60 | 1. 电脑(台式机或笔记本) 61 | 2. 浏览器,例如Google Chrome 62 | 63 | 64 | 软件要求: 65 | 1. IDE/文本编辑器,如 [VS Code](https://code.visualstudio.com) 或 [WebStorm](https://www.jetbrains.com/webstorm/) 66 | 2. [npm](https://www.npmjs.com) 包管理器,一般随 [Node.js](https://nodejs.org/en) 发布 67 | 3. Codelab的示例代码 68 | 4. 终端/控制台 69 | 70 | 71 | ## 操作结果 72 | 运行该app后,您将会看到如下页面: 73 | 74 | 75 | 76 | 点击“TRUE”或“FALSE”按钮进行答题;点击“POST SCORE”按钮记录用户获得的分数。所有信息将被上传到Hianalytics控制台,您可以通过实时监控来实时查看这些信息。 77 | 78 | 点击“SETTINGS”按钮: 79 | 80 | 81 | 82 | 您将被要求提供最喜欢的运动。您的选择将作为用户属性记录到Hianalytics中。 83 | 84 | ## 技术支持 85 | 如果您对HMS Core还处于评估阶段,可在[Reddit社区](https://www.reddit.com/r/HuaweiDevelopers/)获取关于HMS Core的最新讯息,并与其他开发者交流见解。 86 | 87 | 如果您对使用HMS示例代码有疑问,请尝试: 88 | - 开发过程遇到问题上[Stack Overflow](https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Votes),在`huawei-mobile-services`标签下提问,有华为研发专家在线一对一解决您的问题。 89 | - 到[华为开发者论坛](https://developer.huawei.com/consumer/cn/forum/blockdisplay?fid=18) HMS Core板块与其他开发者进行交流。 90 | 91 | 如果您在尝试示例代码中遇到问题,请向仓库提交[issue](https://github.com/HMS-Core/hms-analytics-demo-javascript/issues),也欢迎您提交[Pull Request](https://github.com/HMS-Core/hms-analytics-demo-javascript/pulls)。 92 | 93 | ## 授权许可 94 | HmsAnalyticsKitDemo经过 [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0) 许可。 95 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/babel.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | module.exports = { 17 | presets: ["@vue/cli-plugin-babel/preset"] 18 | }; 19 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "answer-demo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "babel-polyfill": "6.26.0", 11 | "core-js": "3.6.5", 12 | "vue": "2.6.6", 13 | "vue-router": "3.0.2" 14 | }, 15 | "devDependencies": { 16 | "@vue/cli-plugin-babel": "~4.4.0", 17 | "@vue/cli-service": "~4.4.0", 18 | "@vue/eslint-config-prettier": "^6.0.0", 19 | "babel-eslint": "^10.1.0", 20 | "prettier": "^1.19.1", 21 | "vue-template-compiler": "2.6.6" 22 | }, 23 | "browserslist": [ 24 | "> 1%", 25 | "last 2 versions", 26 | "not dead" 27 | ], 28 | "_id": "answer-demo@0.1.0" 29 | } 30 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/hmsanalyticskitdemo-start/public/favicon.ico -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/public/index.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | hmsanalyticskitdemo-start 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/App.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 23 | 24 | 25 | 32 | 33 | 41 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/assets/css/global.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | html, 17 | body { 18 | margin: 0; 19 | padding: 0; 20 | font-family: Arial, Helvetica, sans-serif; 21 | background-color: rgba(245, 245, 245, 1); 22 | height: 100%; 23 | } 24 | 25 | .mr20 { 26 | margin-right: 20px; 27 | } 28 | 29 | .ml20 { 30 | margin-left: 20px; 31 | } 32 | 33 | .main { 34 | width: 1200px; 35 | margin: 0 auto; 36 | height: calc(100% - 100px); 37 | } 38 | 39 | .main-head { 40 | margin: 20px 0; 41 | display: flex; 42 | justify-content: space-between; 43 | align-items: center; 44 | } 45 | 46 | .head-title { 47 | font-size: 18px; 48 | color: #36383c; 49 | font-weight: bold; 50 | } 51 | 52 | .button-class { 53 | background: rgba(160, 207, 255, 1); 54 | color: #fff; 55 | outline: none; 56 | border: none; 57 | height: 32px; 58 | line-height: 30px; 59 | text-align: center; 60 | border-radius: 1px; 61 | font-size: 14px; 62 | min-width: 96px; 63 | cursor: pointer; 64 | border-radius: 8px; 65 | padding: 0 12px; 66 | } 67 | 68 | .button-class:hover, 69 | .button-class.hover { 70 | background-color: rgba(64, 158, 255, 1); 71 | } 72 | 73 | .btn-gray { 74 | background: rgba(189, 189, 189, 1); 75 | } 76 | 77 | .btn-icon { 78 | display: inline-block; 79 | width: 20px; 80 | height: 20px; 81 | margin-right: 5px; 82 | position: relative; 83 | top: 5px; 84 | } 85 | 86 | .icon-set { 87 | background: url(../img/setting.png) no-repeat left center; 88 | background-size: 20px; 89 | } 90 | 91 | .icon-post { 92 | background: url(../img/up.png) no-repeat left center; 93 | background-size: 20px; 94 | } 95 | 96 | .main-content { 97 | box-sizing: border-box; 98 | background: #fff; 99 | border-radius: 8px; 100 | box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.1); 101 | padding: 40px 70px; 102 | min-height: 600px; 103 | } 104 | 105 | .main-content .title { 106 | font-weight: 700; 107 | font-size: 16px; 108 | margin-bottom: 40px; 109 | } -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/assets/img/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/hmsanalyticskitdemo-start/src/assets/img/setting.png -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/assets/img/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/hmsanalyticskitdemo-start/src/assets/img/up.png -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/components/AnswerDemo.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 40 | 41 | 123 | 124 | 138 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/components/Result.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 39 | 40 | 73 | 74 | 107 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/components/Settings.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 32 | 33 | 53 | 54 | 81 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/eventBus.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import Vue from "vue"; 17 | export default new Vue(); -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import Vue from "vue"; 17 | import App from "./App.vue"; 18 | import 'babel-polyfill'; 19 | import router from './router.js'; 20 | import './assets/css/global.css'; 21 | 22 | // TODO: import necessary sdks 23 | 24 | Vue.config.productionTip = false; 25 | 26 | // TODO: Initiate Analytics Kit 27 | 28 | new Vue({ 29 | router, 30 | render: h => h(App), 31 | }).$mount('#app') 32 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/src/router.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import Vue from 'vue' 17 | import Router from 'vue-router' 18 | 19 | import AnswerDemo from './components/AnswerDemo.vue'; 20 | import Settings from './components/Settings.vue'; 21 | import Result from './components/Result.vue'; 22 | 23 | Vue.use(Router); 24 | 25 | 26 | let routes = [ 27 | { 28 | path: '/', // 重定向到home页面 29 | redirect: '/answerDemo' 30 | }, { 31 | path: '/answerDemo', 32 | name: 'answerDemo', 33 | component: AnswerDemo, 34 | }, { 35 | path: '/settings', 36 | name: 'settings', 37 | component: Settings 38 | }, { 39 | path: '/result', 40 | name: 'result', 41 | component: Result 42 | } 43 | ] 44 | let router = new Router({ 45 | mode: 'hash', 46 | routes 47 | }); 48 | 49 | router.beforeEach((to, from, next) => { 50 | next(); 51 | }) 52 | 53 | 54 | export default router; -------------------------------------------------------------------------------- /hmsanalyticskitdemo-start/vue.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | module.exports = { 17 | publicPath: './', 18 | productionSourceMap: false, 19 | chainWebpack: config => { 20 | config.plugins.delete(`preload`) 21 | config.plugins.delete(`prefetch`) 22 | }, 23 | devServer: { 24 | disableHostCheck: true, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/babel.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | module.exports = { 17 | presets: ["@vue/cli-plugin-babel/preset"] 18 | }; 19 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "answer-demo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "@hw-hmscore/analytics-web": "^6.6.0-300", 11 | "babel-polyfill": "6.26.0", 12 | "core-js": "3.6.5", 13 | "vue": "2.6.6", 14 | "vue-router": "3.0.2" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "~4.4.0", 18 | "@vue/cli-service": "~4.4.0", 19 | "@vue/eslint-config-prettier": "^6.0.0", 20 | "babel-eslint": "^10.1.0", 21 | "prettier": "^1.19.1", 22 | "vue-template-compiler": "2.6.6" 23 | }, 24 | "browserslist": [ 25 | "> 1%", 26 | "last 2 versions", 27 | "not dead" 28 | ], 29 | "_id": "answer-demo@0.1.0" 30 | } 31 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/hmsanalyticskitdemo/public/favicon.ico -------------------------------------------------------------------------------- /hmsanalyticskitdemo/public/index.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | hmsanalyticskitdemo 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/App.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 23 | 24 | 25 | 32 | 33 | 41 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/assets/css/global.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | html, 18 | body { 19 | margin: 0; 20 | padding: 0; 21 | font-family: Arial, Helvetica, sans-serif; 22 | background-color: rgba(245, 245, 245, 1); 23 | height: 100%; 24 | } 25 | 26 | .mr20 { 27 | margin-right: 20px; 28 | } 29 | 30 | .ml20 { 31 | margin-left: 20px; 32 | } 33 | 34 | .main { 35 | width: 1200px; 36 | margin: 0 auto; 37 | height: calc(100% - 100px); 38 | } 39 | 40 | .main-head { 41 | margin: 20px 0; 42 | display: flex; 43 | justify-content: space-between; 44 | align-items: center; 45 | } 46 | 47 | .head-title { 48 | font-size: 18px; 49 | color: #36383c; 50 | font-weight: bold; 51 | } 52 | 53 | .button-class { 54 | background: rgba(160, 207, 255, 1); 55 | color: #fff; 56 | outline: none; 57 | border: none; 58 | height: 32px; 59 | line-height: 30px; 60 | text-align: center; 61 | border-radius: 1px; 62 | font-size: 14px; 63 | min-width: 96px; 64 | cursor: pointer; 65 | border-radius: 8px; 66 | padding: 0 12px; 67 | } 68 | 69 | .button-class:hover, 70 | .button-class.hover { 71 | background-color: rgba(64, 158, 255, 1); 72 | } 73 | 74 | .btn-gray { 75 | background: rgba(189, 189, 189, 1); 76 | } 77 | 78 | .btn-icon { 79 | display: inline-block; 80 | width: 20px; 81 | height: 20px; 82 | margin-right: 5px; 83 | position: relative; 84 | top: 5px; 85 | } 86 | 87 | .icon-set { 88 | background: url(../img/setting.png) no-repeat left center; 89 | background-size: 20px; 90 | } 91 | 92 | .icon-post { 93 | background: url(../img/up.png) no-repeat left center; 94 | background-size: 20px; 95 | } 96 | 97 | .main-content { 98 | box-sizing: border-box; 99 | background: #fff; 100 | border-radius: 8px; 101 | box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.1); 102 | padding: 40px 70px; 103 | min-height: 600px; 104 | } 105 | 106 | .main-content .title { 107 | font-weight: 700; 108 | font-size: 16px; 109 | margin-bottom: 40px; 110 | } -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/assets/img/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/hmsanalyticskitdemo/src/assets/img/setting.png -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/assets/img/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/hmsanalyticskitdemo/src/assets/img/up.png -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/components/AnswerDemo.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 40 | 41 | 134 | 135 | 149 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/components/Result.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 39 | 40 | 73 | 74 | 107 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/components/Settings.vue: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 32 | 33 | 52 | 53 | 80 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/eventBus.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import Vue from "vue"; 17 | export default new Vue(); -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import Vue from "vue"; 17 | import App from "./App.vue"; 18 | 19 | import agconnect from '@agconnect/api'; 20 | import '@agconnect/instance'; 21 | import '@hw-hmscore/analytics-web'; 22 | import router from './router.js'; 23 | import './assets/css/global.css'; 24 | import 'babel-polyfill'; 25 | 26 | Vue.config.productionTip = false; 27 | var agConnectConfig = {}; 28 | agconnect.instance().configInstance(agConnectConfig); 29 | 30 | Vue.prototype.$hiAnalytics = agconnect.analytics(); 31 | 32 | new Vue({ 33 | router, 34 | render: h => h(App), 35 | }).$mount('#app') 36 | -------------------------------------------------------------------------------- /hmsanalyticskitdemo/src/router.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import Vue from 'vue' 17 | import Router from 'vue-router' 18 | 19 | import AnswerDemo from './components/AnswerDemo.vue'; 20 | import Settings from './components/Settings.vue'; 21 | import Result from './components/Result.vue'; 22 | 23 | Vue.use(Router); 24 | 25 | 26 | let routes = [ 27 | { 28 | path: '/', // 重定向到home页面 29 | redirect: '/answerDemo' 30 | }, { 31 | path: '/answerDemo', 32 | name: 'answerDemo', 33 | component: AnswerDemo, 34 | }, { 35 | path: '/settings', 36 | name: 'settings', 37 | component: Settings 38 | }, { 39 | path: '/result', 40 | name: 'result', 41 | component: Result 42 | } 43 | ] 44 | let router = new Router({ 45 | mode: 'hash', 46 | routes 47 | }); 48 | 49 | router.beforeEach((to, from, next) => { 50 | if (to.name && from.name) { 51 | router.app.$hiAnalytics.pageEnd('http://' + window.location.host + '/#' + from.path); 52 | router.app.$hiAnalytics.pageStart('http://' + window.location.host + '/#' + to.path); 53 | } 54 | next(); 55 | }) 56 | 57 | 58 | export default router; -------------------------------------------------------------------------------- /hmsanalyticskitdemo/vue.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | module.exports = { 17 | publicPath: './', 18 | productionSourceMap: false, 19 | chainWebpack: config => { 20 | config.plugins.delete(`preload`) 21 | config.plugins.delete(`prefetch`) 22 | }, 23 | devServer: { 24 | disableHostCheck: true, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /screenshot/screen_0.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/screenshot/screen_0.PNG -------------------------------------------------------------------------------- /screenshot/screen_1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HMS-Core/hms-analytics-demo-javascript/2b9b4c77aeade0fd2c460d1664ed09724cbd8b18/screenshot/screen_1.PNG --------------------------------------------------------------------------------