我有一个网站,其中有 4 个帐户注册步骤。我正在尝试使用 javascript 实现一个谷歌分析漏斗,以了解有多少人完成了注册过程的每个步骤。我使用 asp.net 向导控件进行帐户注册。每个步骤都引用同一个页面 (signup/default.aspx) 以及下一个和上一个按钮。
protected void wzsignup_ActiveStepChanged(object sender, EventArgs e)
{
string step = wzsignup.ActiveStep.ID.ToString(CultureInfo.InvariantCulture); //example of step name is personaldetails..
string script = "var _gaq=_gaq || [];_gaq.push(['_setAccount','UA-XXXXX-1' ]);_gaq.push(['_setDomainName', 'none']);_gaq.push(['_trackPageview'],'/{0}');(function(){{var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s);}})();";
script = string.Format(script, step);
HtmlGenericControl scriptTag = new HtmlGenericControl("script");
scriptTag.Attributes.Add("type", "text/javascript");
scriptTag.InnerHtml = script;
this.Page.Header.Controls.Add(scriptTag);
}
如何获取注册步骤报告?