Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:46:33+00:00 2026-05-25T18:46:33+00:00

I use Google Analytics, and the first thing I want to check every day

  • 0

I use Google Analytics, and the first thing I want to check every day is the current day’s statistics. But there’s no way to bookmark the current day.
The URL for any given day is: https://www.google.com/analytics/reporting/dashboard?id=XXXXXXX&pdr=20110921-20110921

You can see a date range at the end of the URL. 20110921 meaning 9-21, 2011.

How can I write a little javascript bookmarklet for Firefox to change the URL to the current date depending on what day I click on it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:46:34+00:00Added an answer on May 25, 2026 at 6:46 pm

    Try this – it uses a Date object to get the date:

    var date = new Date();
    var str = "";
    str += date.getFullYear();
    str += pad2(date.getMonth() + 1);
    str += pad2(date.getDate());
    function pad2(n) {
       var str = String(n);
       if(str.length < 2)
        str = "0" + str;
       return str;
    }
    location.href = "https://www.google.com/analytics/reporting/dashboard?id=XXXXXXX&pdr="+str+"-"+str;
    

    Bookmarklet:

    javascript:(function(){function d(a){a=String(a);a.length<2&&(a="0"+a);return a}var c=new Date,b="";b+=c.getFullYear();b+=d(c.getMonth()+1);b+=d(c.getDate());location.href="https://www.google.com/analytics/reporting/dashboard?id=XXXXXXX&pdr="+b+"-"+b})();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm tring to use com.google.android.apps.analytics.GoogleAnalyticsTracker but got NoClassDefFoundError when GoogleAnalyticsTracker.getInstance(); I'm sure that libGoogleAnalytics.jar
We are trying to use google analytics and hubspot on our site but they
I would normally use Google analytics because it is free and simple to implement
I am willing to use Google Analytics to track stats about usage of my
Anyone know how to use Google Analytics for a Drupal-powered company intranet site behind
I'm trying to use Google Analytics API to query internal searches that happen on
I'm switching over our site to use Asynchronous Google Analytics, and I'm curious about
So Google Analytics does not have an API that we can use to get
I'm trying to use google anayltics events but so far without any success.. What
I am trying to use Google Analytics with a MonoTouch application (iPhone). It works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.