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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:27:11+00:00 2026-05-21T23:27:11+00:00

I want to track a JavaScript event on a page, but I don’t want

  • 0

I want to track a JavaScript event on a page, but I don’t want to track the page view itself. If I remove the ['_trackPageview'] below will GA still be included on the page correctly and will it track the JavaScript events? Or do you HAVE to track the page that GA is included on?

_gaq.push(
    ['_setAccount', 'XX-111111-1'],
    ['_trackPageview'] //get rid of this line
);

(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);
})();
  • 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-21T23:27:12+00:00Added an answer on May 21, 2026 at 11:27 pm

    You do not need to include the _trackPageview. If you include your own _trackEvent calls, they’ll work fine. But that will mean that information from these pages will be missing from the Content view, and only the data from the Event calls you send will be recorded.

    In earlier versions of Google Analytics, calling _trackEvent without _trackPageview would trigger a bug, but that is no longer the case, since April 2010.

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

Sidebar

Related Questions

I want track offline event using Google Analytic and Local Storage. this is my
I have a javascript application that's will keep track of the x&y coordinates of
I want to track how much traffic I'm getting on an RSS feed that
We want to track the time taken by a web service call between a
i have a table where i want to track time so a valid entry
I am storing Integer objects representing an index of objects I want to track.
I'm creating an API for my Rails app, and I want to track how
Is there anyway, in PHP, to detect someone's username? I want to track the
I have a winforms app and i want to keep track of every time
I want to add some functionality track certain calls to ActiveX object methods in

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.