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 8212969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:57:09+00:00 2026-06-07T10:57:09+00:00

I need a modified JavaScript which inflated the pageviews, unique visitors and visitor count!

  • 0

I need a modified JavaScript which inflated the pageviews, unique visitors and visitor count!

For educational purposes because I want to see if there are certain patterns when artificaly altering the G. Analytics report

I coded this but it does not work:

 <script type="text/javascript">

var i=0;
 for (i=0;i<=10;i++) {

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19629541-9']);
 _gaq.push(['_trackPageview']);

   _gaq.push([_setDomainName, '.domain.com']); 
   _gaq.push([_setDomainName, 'domain.com']);

  (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>​​​​

and this Code only alters the pageviews:

<script>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'     type='text/javascript'%3E%3C/script%3E"));
</script>   
<script>
// Google Analytics
var pageTracker;
try {
    pageTracker = _gat._getTracker("UA-15064357-1"); // pour dystroy.org
    pageTracker._setDomainName("none");
    pageTracker._setAllowLinker(true);
    for (var i=10; i-->0;) pageTracker._trackPageview();
} catch(err) {console.log(err);}
</script>​

I am asking becasue I recenlty viewed an analytics report which did not quite mach up with all the underlaying data

  • 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-06-07T10:57:12+00:00Added an answer on June 7, 2026 at 10:57 am

    An analytics report can only be trusted as long as you trust the site developers.

    A developer can modify it to register the events and page views he wants to have. That’s totally normal.

    It’s a tool for the developers and the site owners, not an independent proof of the popularity of a site.

    EDIT : I just tried to add a loop on one of my sites (for which I really don’t care about analytics) : http://dystroy.org/re7210/

    <script>
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>   
    <script>
    // Google Analytics
    var pageTracker;
    try {
            pageTracker = _gat._getTracker("UA-15064357-1"); // pour dystroy.org
            pageTracker._setDomainName("none");
            pageTracker._setAllowLinker(true);
            for (var i=10; i-->0;) pageTracker._trackPageview();
    } catch(err) {console.log(err);}
    </script>
    

    And it works :

    enter image description here

    Only multiples of 10.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a script to copy only the changed/modified and new files from my
In C++, if you need to have 2 objects modified, you can pass by
if a style is used, it can not be modified agaign. so i need
I need to see if a modifier key is pressed(shift,ctrl,alt) for my mouse event(basically
I need a rewrite in how the modifier 'truncate' is called, because it is
Hi I need to generate a random number in JavaScript between 15 and 225
Hi I am using some modified code from another post. Basically I want to
I'm here now because of two things. First: I need to modify a jQuery
I need to build a small JavaScript library that would only be a couple
I am developing an application which uses .js files stored in the Resources/javascript folder

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.