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

  • Home
  • SEARCH
  • 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 7862963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:19:38+00:00 2026-06-02T23:19:38+00:00

i call trackpageview within the onstatechange callback (which i checked is being called), because

  • 0

i call trackpageview within the onstatechange callback (which i checked is being called), because in an all-ajax site, the states are the pages.

History.Adapter.bind(window, 'statechange', function() {
_gaq.push([ '_trackPageview', History.getState().url ]); 
}

i also have the necessary snippet in the (again, which is only ever called once, because this site is all-ajax).

<script type="text/javascript">

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

  (function() { ... })();

</script>

however, i do not see these pageviews on my google analytics account, neither in ‘standard reporting’ nor in the ‘realtime’.

why aren’t these pageviews being tracked?

  • 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-02T23:19:40+00:00Added an answer on June 2, 2026 at 11:19 pm

    (I assume you use History.js)

    History.getState().url return the complete URL, begining with the protocol (http://…).

    When using pageURL parameter with _trackPageview, you must use a beginning slash (/) to indicate the page URL (cf doc). Otherwise the request will not be taken into account by Google Analytics.

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

Sidebar

Related Questions

I call an ajax enabled wcf service method , <script type=text/javascript> function GetEmployee() {
I call sortable.stop() to make an ajax call to store some data after drag
I have implemented an XMLHttpRequest() call to a standalone html page which simply has
Call to a member function save() on a non-object in .../views/manufacturer/tmpl/edit.php line 24 which
Call like: mAsyncRunner.request(me, params,new AsyncFacebookRunner.RequestListener() returns me all info for user /according to permisions/.
The call to n.sort(sortNo) doesn't specify any parameters for the function sortNo (which defines
I'm working on a site that uses Google Analytics. On most of the pages
I'm retrieving content via a jQuery get Ajax call and add it to an
before call protected void onSubmit() { , what method is called by wicket? my
We call a webservice from our C# app which takes about 300ms using WCF

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.