Track Page Views with Google Analytics
NickName:Miguel Moura Ask DateTime:2013-10-16T00:20:34

Track Page Views with Google Analytics

I need to track page views of a site with Google Analytics.

As far as I know I need to send the URL of the page to GA.

But sometimes the URL might change in the future even if it is the same page.

Shouldn't I send info on the page instead of the URL? Something like:

Track("Contact Page").

How should I do it and does Google Analytics allow that?

Thank you, Miguel

Copyright Notice:Content Author:「Miguel Moura」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/19386183/track-page-views-with-google-analytics

Answers
Steven V 2013-10-15T16:30:51

Yes, it's possible to force Google Analytics to use a set string for a page that would remain static. Per the documentation:\n\nnew style:\n\nga('send', 'pageview', '{static url here}');\n\n\nold style:\n\n_gaq.push(['_trackPageview', '{static url here}']);\n\n\nBut a warning, renaming page URLs could do some harm to your search engine ranking over time and frustrate your users.",


More about “Track Page Views with Google Analytics” related questions

Track Page Views with Google Analytics

I need to track page views of a site with Google Analytics. As far as I know I need to send the URL of the page to GA. But sometimes the URL might change in the future even if it is the same page.

Show Detail

google analytics track php mvc page views

Im trying to figure out how to track google analytics php mvc page views. I have through htaccess told the server to route all requests through an index.php file in the root. My google anayltics

Show Detail

Google Tag Manager : universal analytics does not track page views with adblock

I have created a tag to track page views with universal analytics on google tag manager. Tracking page views does not work when adblock is enabled. Why the page view is not tracked with universal

Show Detail

Google analytics to track impressions/views?

I have a site that lists business listings from a database. On each page you can do different things such as forward it to a friend, print the page etc. My question is could I use google analytics to

Show Detail

How to track page views or analytics on partials for Ruby on Rails?

How do people track page views or analytics for partials in Ruby on Rails? For instance, we have a form rendered in a partial, but we would like to track and analyze user behavior relating to the f...

Show Detail

How to track "page views per minute" using Google Analytics Real Time API?

I'm using the Google Analytics Real Time API (https://developers.google.com/analytics/devguides/reporting/realtime/v3/) to track the active visitors per minute. For this, I use the metric rt:

Show Detail

Google analytics for page views

I'm trying to set up Google Analytics on my web site to record views each page gets. On the site, users can upload items and they get their own pages for their items. My questions are, Can you use

Show Detail

Tracking Google Analytics Page Views with AngularJS

I'm setting up a new app using AngularJS as the frontend. Everything on the client side is done with HTML5 pushstate and I'd like to be able to track my page views in Google Analytics.

Show Detail

Google Analytics Custom Dimension To Track Page Type Views

I have setup a custom dimension that I want to use to track the different post types on my site. I wanted to have a pie chart or table that shows the breakdown of page views across news, reviews,

Show Detail

Track button views and clicks as events in google analytics

I am trying to place a button that will be inside email and I want to track button views and clicks (Google Analytics events). Can you tell me if that is possible and how to do that?

Show Detail