关于_deleteCustomVar()的使用的问题 [英] Questions on the usage of _deleteCustomVar()

查看:137
本文介绍了关于_deleteCustomVar()的使用的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在网站上使用了一些访问者级别的自定义变量(我们使用1到5的所有索引),现在我们使用索引1作为另一个自定义变量名称(没有代码可以将自定义变量设置为之前的变量名称) ,但我们遇到一个问题:我们仍然看到以前的自定义变量名称的少数数据。

We have done some visitor level custom variables on our website (we used all indexes from 1 to 5), and now we are using index 1 for another custom variable name (no code to set custom variable to the previous variable name), but we encountered a problem: we still see few data for the previous custom variable name.

我们认为它应该是因为索引1的上一个自定义变量名称仍然保存在某些用户的浏览器的cookie。
所以我们找到函数_deleteCustomVar(index),它可以通过索引删除自定义变量。

We think it should because the previous custom variable name of index 1 is still saved in the cookie of some user's browsers. So we find the function _deleteCustomVar(index) which can delete the custom variable by indexes.

我的目标是,没有新的数据为以前的自定义变量名称

My goal is, no new data for previous custom variable name for that index in the future, but new custom variable name can still use that index.

我对这个函数的用法有一些疑问:

I have some questions on the usage of this function:


  1. 当我们调用_deleteCustomVar(index)时,它会做多少工作?删除用户Cookie中的自定义变量索引,或向Google Analytics(分析)网站发送请求?

  1. when we call _deleteCustomVar(index), how much work it will do? remove the custom variable index in user's cookie, or send a request to google analytics website?

如上所述,如果我们已经使用相同的索引一个新的自定义变量名,我们还可以调用_deleteCustomVar函数来删除以前的自定义变量名吗?如果我们不能,我应该做什么来实现我的目标?

as i mentioned above, if we are already using the same index for a new custom variable name, can we still call _deleteCustomVar function to remove the previous custom variable name? if we cannot, what should i do to achieve my goal?


推荐答案


  1. _deleteCustomVar 不会向Google Analytics(分析)发送自己的请求。 ( _setCustomVar )。相反, _deleteCustomVar 只要从Cookie中删除变量值(如果是访问者级别的自定义变量),并从当前页面的范围中删除自定义变量,以便将来在该页面上的请求。

  1. _deleteCustomVar does not send its own request to Google Analytics. (Neither does _setCustomVar). Instead, _deleteCustomVar just removes the variable value from the cookie if it's a visitor level custom variable, and deletes the custom variable from the current page's scope for future requests on that page. It also takes effect for all future hits to Google Analytics.

如果您将新的自定义变量设置为已在其中包含自定义变量的索引特定用户(当时),它会覆盖该值。 setCustomVar 具有同时执行 _deleteCustomVar setCustomVar 这是新的价值,因为Google Analytics(分析)只允许每个变量槽一个自定义变量。

If you set a new custom variable to an index that already has a custom variable in it for that particular user (at that time), it overwrites the value. setCustomVar has the effect of doing both _deleteCustomVar and setCustomVar for that new value at the same time, since Google Analytics only allows one custom variable per variable slot.

请注意, deleteCustomVar em>过去与该变量一起发送的数据。 (实际上,它只会减少与该自定义变量相关联的网页浏览量,而访问者级变量则不会与任何未来的访问次数相关联。已删除或覆盖的已向Google Analytics(分析)发送匹配的变量仍将与会话。)

It's important to note that deleteCustomVar does nothing for past data that has been sent with that variable. (In effect, it will only reduce the number of pageviews associated with that custom variable, and for visitor level variables, not be associated with any future visits. Deleted or overwritten variables that have already sent hits to Google Analytics will still be associated with that session in some way.)

至于为什么可能会出现'旧'变量值仍然显示,好,它的复杂。 Google Analytics(分析)的一些关联基于用户;有些是基于会话和一些网页浏览。很可能是因为任何数据差异是由于误解。

As to why you might end up with 'old' variable values still showing up, well, its complicated. Some of Google Analytics's associations are based on users; some are based on sessions, and some pageviews. It's likely that any data discrepancies are due to a misunderstanding.

因此,如果用户在单个会话期间在同一个广告位的匹配中设置并发送了3个不同的自定义变量,并且您创建了一个高级细分通过会话)为任何一个变量,该会话将通过。

So, if a user, during a single session, has 3 different custom variables set and sent on hits for the same slot, and you create an advanced segment (which segments by sessions) for any one of those variables, that session will come through.

同样的情况,如果您计算具有自定义变量的访问次数,则计数可能会重叠,因此您可以为每个访问次数同一个插槽,但只有10次访问。

Same scenario, if you're counting visits that have a custom variable, the counts can overlap, such that you could have 10 visits each for each of the 3 variables of the same slot, but only 10 visits total.

这篇关于关于_deleteCustomVar()的使用的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆