小编par*_*ara的帖子

如何在 OpenSearchDescription xml 文件中定义触发器关键字?

我正在尝试获得一个开放的搜索定义来处理子域。

我<head>在 html 中添加了正确的行。

例子:

<link rel="search" type="application/opensearchdescription+xml" title="Example" href="http://www.example.org/opensearch.xml" />
Run Code Online (Sandbox Code Playgroud)

在 opensearch.xml 中:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Example</ShortName>
<LongName>Example Search</LongName>
<Description>Example Description</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://www.example.org/favicon.ico</Image>
<Url type="text/html" method="get" template="http://www.example.org/search/{searchTerms}" />
</OpenSearchDescription>
Run Code Online (Sandbox Code Playgroud)

当我访问http://www.example.org时,搜索已正确添加到 Google Chrome 的多功能框设置中。触发器关键字变为“example.org”。

但是,当我访问http://subdomain.example.org 时,它在 中具有相同的行<head>,搜索添加了触发器关键字“subdomain.example.org”而不是“example.org”。

有没有解决的办法?

我在http://www.opensearch.org/Specifications/OpenSearch/1.1的文档中没有找到有关如何设置触发器关键字的任何信息。

subdomain triggers keyword opensearch omnibox

8
推荐指数
0
解决办法
1236
查看次数

自定义维度在GTM中跟踪,但未在UA中显示

我尝试设置Google跟踪代码管理器.网页浏览量已正确跟踪,但在Universal Analytics中,我看不到自定义维度.

在Google Universal Analytics中:

我在"管理" - >"自定义定义" - >"自定义维度"下的Universal Analytics配置文件中定义了一些自定义维度.

以下维度是相关的:

(Name)                   (Index)
PageView Author          7
PageView Themenwelt      8
PageView Seitentyp       9
PageView Posttyp         10
PageView Modified Date   11
Run Code Online (Sandbox Code Playgroud)

在Google跟踪代码管理器中

我添加了一个包含跟踪类型"页面视图"的通用分析标记页面以及"自定义维度"的以下设置:

(Index)                  (Dimension)
7                        {{Tracking Variable Posttyp}}
9                        {{Tracking Variable Seitentyp}}
8                        {{Tracking Variable Themenwelt}}
7                        {{Tracking Variable Autor}}
11                       {{Tracking Variable Modified Date}}
Run Code Online (Sandbox Code Playgroud)

使用"Javascript变量"宏通过宏获取维度的值.这样一个宏的例子就是:

Global Variable Name: window.analytics_tracking_params.Author
Run Code Online (Sandbox Code Playgroud)

变量在标记管理器代码之前的网站内容中定义.

当我进入标签管理器的调试模式时,我可以看到触发的事件,以及"Dimension"的以下调试条目:

{
   7: Tracking Variable Autor,
   8: Tracking Variable Themenwelt,
   9: Tracking Variable Seitentyp,
   10: Tracking Variable Posttyp,
   11: …
Run Code Online (Sandbox Code Playgroud)

google-tag-manager universal-analytics

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