书签乐趣:今天检查Google Analytics(分析)[更新]

Update! Our friend Ryan from CyberNet pointed out a bug in the version I posted yesterday, so you’ll want to update your bookmarklet with the fixed version provided below. Sorry for the trouble!

更新! 来自Cyber​​Net的朋友Ryan指出了我昨天发布的版本中的一个错误,因此您需要使用下面提供的固定版本来更新您的书签。 抱歉,添麻烦了!

Like anybody that has a website, I love Google Analytics… but it drives me crazy that the default view is for the last 30 days when I really just want to see what has happened today. The only way to check for today is to manually change the date in the report, so I hooked up a bookmarklet to do that for me.

就像拥有网站的任何人一样,我喜欢Google Analytics(分析)……但是让我发疯的是,默认视图是过去30天的视图,当时我只想看看今天发生了什么。 今天检查的唯一方法是手动更改报告中的日期,所以我挂了一个书签来为我做这件事。

With a small modification, you can use the same bookmarklet for your own use. All you’ll have to do is replace the ID in the bookmarklet with the ID for your Analytics account. (Note that you could use this to your advantage to make separate bookmarklets for multiple accounts)

稍作修改,您就可以使用相同的书签。 您所要做的就是将小书签中的ID替换为您的Google Analytics(分析)帐户的ID。 (请注意,您可以利用它来为多个帐户制作单独的书签)

First, drag the following bookmarklet to your bookmarks bar:

首先,将以下书签添加到书签栏:

Analytics Today Bookmarklet

今日Analytics(分析)书签

Now you’ll need to figure out what your Analytics account ID is by logging into analytics and going to the dashboard for your account. Find the long number after “?id=” and save it somewhere.

现在,您需要登录到Analytics(分析)并转到帐户的信息中心,以了解您的Analytics(分析)帐户ID是什么。 在“?id =”之后找到长号并将其保存在某处。

书签乐趣:今天检查Google Analytics(分析)[更新]

Now open up the properties of the bookmarklet (This example uses Firefox, but IE works similarly)

现在打开书签的属性(此示例使用Firefox,但IE的工作原理与此类似)

书签乐趣:今天检查Google Analytics(分析)[更新]

Find the “YOURIDHERE” part of the text in the location bar, and then replace that with the number you saved from Analytics.

在位置栏中找到文本的“ YOURIDHERE”部分,然后将其替换为您从Analytics(分析)中保存的数字。

书签乐趣:今天检查Google Analytics(分析)[更新]

For those interested, here’s the bookmarklet in all it’s hacked together glory:

对于那些感兴趣的人来说,这是所有荣耀中的书签:

javascript:var d=new Date();var pad=”;var padm=”;if(d.getDate()<10){pad='0';};if(d.getMonth()<10){padm='0';};var t=''+d.getFullYear()+padm+(d.getMonth()+1)+pad+d.getDate();location.href=’https://www.google.com/analytics/reporting/dashboard?id=YOURIDHERE&pdr=’+t+’-‘+t+’&cmp=average’

javascript:var d = new Date(); var pad =”; var padm =”; if(d.getDate()<10){pad ='0';}; if(d.getMonth()<10){ padm ='0';}; var t =''+ d.getFullYear()+ padm +(d.getMonth()+1)+ pad + d.getDate(); location.href ='https:// www。 google.com/analytics/reporting/dashboard?id= YOURIDHERE &pdr ='+ t +'-'+ t +'&cmp = average'

If anybody can think of a better way to accomplish this, be sure to let us know in the comments.

如果有人可以想到更好的方法来完成此操作,请确保在评论中告知我们。

翻译自: https://www.howtogeek.com/howto/the-geek-blog/bookmarklet-fun-check-google-analytics-for-today/