小编sis*_*438的帖子

我的 Hugo 谷歌分析设置不起作用

我已将我的跟踪 ID 添加到我的 config.toml 中,一切看起来都匹配了。然而,当我启动https://analytics.google.com/时,我还没有看到任何实时数据进来

theme = "osprey-delight"
tags = ["personal", "homepage", "portfolio"]
# canonifyURLS = true
googleAnalytics = "G-SYJ123456"
disableKinds = ["taxonomy", "taxonomyTerm"] # This theme does not currently use "tag" and "category" taxonomies
enableEmoji = true
pygmentsUseClasses = true
Run Code Online (Sandbox Code Playgroud)

我正在使用一个主题(osprey-delight),在 layouts/partials 目录中,有一个包含模板字符串的 head.html,将粘贴在下面:

  {{ if .Site.GoogleAnalytics }}
    {{ template "_internal/google_analytics_async.html" . }}
  {{ end }}
Run Code Online (Sandbox Code Playgroud)

当我部署到 firebase 时,我确实在 /public 目录的主 index.html 文件中看到了 ga 的脚本标签,它在下面 -

<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; …
Run Code Online (Sandbox Code Playgroud)

google-analytics firebase-hosting hugo google-analytics-4

5
推荐指数
1
解决办法
1136
查看次数

为 FedEx Web 服务创建 HTTP Post 调用

FedEx Web 服务文档指出:

FedEx 提供纯 XML Web 服务解决方案,您可以使用该解决方案发送交易,而无需使用为 Web 服务提供 SOAP 协议支持的工具。

这是他们在文档中使用的一个示例:

Example 3: HTTP POST
The following HTTP POST example is a valid working example. It is not guaranteed to work for all
programming languages, applications, and host systems:
POST /xml HTTP/1.0
Referrer: YourCompanyNameGoesHere
Host: ws.fedex.com
Port: 443
Accept: image/gif, image/jpeg, image/pjpeg, text/plain, text/html, */*
Content-Type: text/xml
Content-length: %d
Your FedEx Transaction

------------------------

Each line is followed by one new line character except Content-length and the FedEx transaction. …
Run Code Online (Sandbox Code Playgroud)

xml soap http fedex kotlin

2
推荐指数
1
解决办法
2081
查看次数

如何检索添加到集合中的最新文档?

使用 cloud-firestore 存储来自用户计算器的一些数据,而不是获取集合中的所有文档,我怎样才能获取最新的?

当前设置是:

db.collection("calculations")
          .get()
          .then(querySnapshot => {
            querySnapshot.forEach(doc => {
              console.log("doc", doc);
              document.getElementById("final-results").innerText +=
                "\n" + doc.data().calcuation;
     });
 });
Run Code Online (Sandbox Code Playgroud)

数据库图像在这里

javascript firebase google-cloud-firestore

1
推荐指数
1
解决办法
2223
查看次数