2025-06-25 / 埋点问题

埋点 js 代码
html
<script type="text/javascript" src="/public/hlx-buried-point.js"></script>华龙网搜索 js
html
<script type="text/javascript" src="/public/bundle.min.js"></script>栏目示例
提示
代码仅做参考,线上正式代码需要将 /public/hlx-buried-point.js 放置公共头部更为合理
html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>xxx 站点</title>
<link rel="icon" href="/assets/img/favicon.ico" />
<meta name="sid" th:content="${config.appId}" />
<meta name="catalogsId" th:content="${config.businessId}" />
<meta name="businessId" th:content="${config.businessId}" />
<meta name="businessType" th:content="${config.businessType}" />
<meta name="title" th:content="${column.name}" />
<!-- 使用华龙网线上 埋点代码 -->
<script type="text/javascript" src="/public/hlx-buried-point.js"></script>
</head>
<body>
<hlx-template
component-type="column"
component-query-option="{'columnId':''}"
component-variable="column"
></hlx-template>
<hlx-template
component-type="comConfig"
component-query-option=""
component-variable="config"
></hlx-template>
</body>
</html>详情示例
提示
代码仅做参考,线上正式代码需要将 /public/hlx-buried-point.js 放置公共头部更为合理
html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>xxx 详情</title>
<link rel="icon" href="/assets/img/favicon.ico" />
<meta name="sid" th:content="${config.appId}" />
<meta name="catalogsId" th:content="${config.mainColumnId}" />
<meta name="businessId" th:content="${config.businessId}" />
<meta name="businessType" th:content="${config.businessType}" />
<meta name="title" th:content="${article.title}" />
<!-- 使用华龙网线上 埋点代码 -->
<script type="text/javascript" src="/public/hlx-buried-point.js"></script>
</head>
<body>
<hlx-template
component-type="news"
component-query-option="{'newsId':''}"
component-variable="article"
></hlx-template>
<hlx-template
component-type="comConfig"
component-query-option=""
component-variable="config"
></hlx-template>
</body>
</html>