简体   繁体   English

我想在我的博客文章中跟踪一些附属链接点击,但分析没有跟踪每一个附属链接点击

[英]I want to track some affiliate link clicks in my blog posts but analytics is not tracking every affiliate link click

Yesterday I got 200+ link clicks on the affiliate dashboard, it only shows around 30 clicks on analytics.昨天我在会员仪表板上获得了 200 多次链接点击,它只显示了大约 30 次分析点击。 I did the setup via tag manager for link click tracking and want to track affiliate link clicks as goals in analytics correctly.我通过标签管理器进行了链接点击跟踪设置,并希望将会员链接点击作为分析中的目标正确跟踪。

The affiliate platform shows a lot more clicks and analytics is tracking only a few.联属网络营销平台显示了更多的点击,而分析只跟踪了少数。 I have three affiliate links in every post on the blog that I want to be tracked when someone clicks on them.我在博客上的每篇文章中都有三个附属链接,当有人点击它们时我想跟踪它们。

For eg: https://www.spiritual-galaxy.com/angel-number-192/ , there are 3 affiliate links here, attaching the screenshots.例如: https://www.spiritual-galaxy.com/angel-number-192/ ,这里有3个附属链接,附上截图。

Screenshot - Affiliate Link 1屏幕截图 - 附属链接 1

Screenshot - Affiliate Link 2屏幕截图 - 附属链接 2

Screenshot - Affiliate Link 3截图 - 附属链接 3

Attaching the screenshot for GTM settings.附上 GTM 设置的屏幕截图。

Screenshot GTM截图 GTM

Attaching the screenshot for tracking event (affiliate link click) as a goal on analytics.附加用于跟踪事件(关联链接点击)的屏幕截图作为分析目标。

Screenshot - Track Event屏幕截图 - 跟踪事件

GTMs click events can be challenging, and you get no data until it hits GA. GTM 点击事件可能具有挑战性,在它到达 GA 之前您不会获得任何数据。

I would use the outbound clicks listener and manage rules inside of ListenLayer for what defines an affiliate link.我会使用出站点击监听器并在 ListenLayer 中管理规则来定义附属链接。 It will then give you reporting on your click events directly so you will be able to see that compared to GTM.然后,它会直接为您报告您的点击事件,因此您将能够看到与 GTM 相比的情况。

Step 1: Create an account, get your script and place it on your website via GTM.第 1 步:创建一个帐户,获取您的脚本并通过 GTM 将其放置在您的网站上。 Then turn on the Outbound Clicks Listener and it's Activity Features on the feature screen.然后打开 Outbound Clicks Listener 及其功能屏幕上的 Activity Features。 在此处输入图像描述

Step 2: Publish your changes and preview your website in GTM.第 2 步:发布您的更改并在 GTM 中预览您的网站。 Click on your affiliate links and you will see an outboundClick event pushed into the data layer for each click.单击您的附属链接,您将看到每次点击都会向数据层推送一个 outboundClick 事件。 在此处输入图像描述 . . You can see here there are a ton of pieces of info that are really useful.您可以在这里看到大量非常有用的信息。 Each row is a unique element of that click event and you can use them to customize your affiliate click data layer activity for better tracking.每一行都是该点击事件的一个独特元素,您可以使用它们来自定义您的会员点击数据层活动,以便更好地跟踪。

Step 3: Let's identify your affiliate links via ListenLayer with some rules.第 3 步:让我们通过 ListenLayer 使用一些规则来识别您的会员链接。 The issue is that the Listener is going to capture all Outbound Clicks, and I'm assuming you might have some that are NOT affiliate links.问题是侦听器将捕获所有出站点击,我假设您可能有一些不是附属链接。 You can also use the following process to categorize your affiliate links with a lookup table so you can actually segment which ones are receiving clicks!您还可以使用以下过程使用查找表对您的会员链接进行分类,以便您可以实际细分哪些链接正在接收点击!

Turn on the Custom Data Layer Feature under the Outbound Clicks Features screen.打开出站点击功能屏幕下的自定义数据层功能。 Then create a new data layer variable under Global Custom Data Layer Variables然后在 Global Custom Data Layer Variables 下创建一个新的数据层变量在此处输入图像描述 I'm creating one called affiliateClick .我正在创建一个名为affiliateClick的。 I am going to write some rules to push "yes" into this variable in my data layer whenever an affiliate link is clicked!每当单击会员链接时,我将编写一些规则以将“是”推送到我的数据层中的此变量中!

Step 3: Inside my Outbound Clicks Listener navigation, I will select Custom Values.第 3 步:在 Outbound Clicks Listener 导航中,我将 select 自定义值。 Then create a Lookup Rule.然后创建一个查找规则。 We're going to use some values in our automatic data layer to determine if a click is an affiliate click.我们将在我们的自动数据层中使用一些值来确定点击是否是附属点击。 You can see in step 3 I would recommend just using a variable and selecting from this list.您可以在第 3 步中看到,我建议您只使用一个变量并从此列表中进行选择。
在此处输入图像描述 For example, maybe you use hostname because you know all the website domains you will link to that are affiliate.例如,您可能使用主机名,因为您知道您将链接到的所有网站域都是附属网站。 Or you could add a URL parameter to all affiliate links and target that in the click event.或者,您可以将 URL 参数添加到所有附属链接并在点击事件中定位。 I'm going to select Hostname.我要去 select 主机名。 On the next step, select to define a value for the variable we created in step 2.在下一步中,select 为我们在步骤 2 中创建的变量定义一个值。 在此处输入图像描述 Then click save and manage values.然后单击保存和管理值。

Step 4: A table will be generate and you can insert rows.第 4 步:将生成一个表,您可以插入行。 Each row is a rule, read top to bottom and it stops when a match is found.每行都是一条规则,从上到下阅读,找到匹配项时停止。 Here are my rules, your affiliate domain is at the top and I have some fake examples of others.这是我的规则,你的附属域名在顶部,我有一些其他的假例子。 You can see how you could also name or categorize these with this rule.您可以看到如何使用此规则命名或分类这些。 At the bottom I have a catch all "no".在底部,我有一个全部“不”。 在此处输入图像描述

Save and publish your changes.保存并发布您的更改。

Step 5: Now your outbound clicks that are affiliate links will have this clear "Yes" value in the data layer第 5 步:现在,作为附属链接的出站点击将在数据层中具有明确的“是”值在此处输入图像描述 So instead of trying to use GTM to target some crazy xpath value, you can simply target event = outboundClick and clickCustomValues.affiliateClick = yes for a trigger that will universally capture your affiliate links.因此,与其尝试使用 GTM 来定位一些疯狂的 xpath 值,您可以简单地定位event = outboundClickclickCustomValues.affiliateClick = yes 以获得普遍捕获您的附属链接的触发器。 Now, if you wanted to you could get super fancy and categorize your affiliate links and pass them into GTM with a variable and pass that to GA with every event - all dynamically.现在,如果你愿意的话,你可以得到超级花哨的东西,对你的附属链接进行分类,并用一个变量将它们传递给 GTM,然后在每个事件中将它传递给 GA——所有这些都是动态的。

I'm sortof assuming you know GTM pretty well but basically you just need to be able to create Custom Event triggers based on the event name in the data layer outboundClick and capture data layer variables.我有点假设您非常了解 GTM,但基本上您只需要能够根据数据层outboundClick中的事件名称创建自定义事件触发器并捕获数据层变量。 If you need help with just reading and using data layer activity in GTM, there are probably a ton of details in other answers on stackoverflow.如果您只需要阅读和使用 GTM 中的数据层活动的帮助,那么在 stackoverflow 上的其他答案中可能有大量详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM