WordPress.com VIP platform specific
This document is for sites running on WordPress.com VIP.
Installing Google Analytics on your VIP site is super easy with the WP Google Analytics plugin. Here’s how to install it:
1. Install and Activate the Plugin
To install the WP Google Analytics plugin, you’ll need to have it added to your theme as a Reviewed Plugin. Please see this documentation for more information regarding Reviewed Plugins.
2. Get Your Google Analytics Tracking ID
If you haven’t set up a Google Analytics account yet, follow these instructions to get it set up. Use the URL that your site will be living at, whether it’s a custom URL or your WordPress.com URL. Once you’ve set up your account, you will see a Tracking ID (typically at the top of the page), which will be in this format: UA-XXXXXX-X. If you’re not sure how to get your Tracking ID, you can get instructions here.
3. Add Your Tracking ID
Navigate to Settings in your Dashboard, and you will now see the Google Analytics Plugin. Paste in your Google Analytics Tracking ID and click Update Options. You’re all done!
Advanced Settings: Customize Your Tracking
The WP Google Analytics Plugin gives you three ways to customize your tracking.
Track Events: Google Analytics gives you the option to track Events, which are actions users take on your site. Using the WP Google Analytics plugin, you can customize which user actions you’d like to log as events. Read more about Events here.
Ignore Visits: You may not want to track your site contributors as “Unique Visitors,” and you may not want to include their publishing and editing activity on your website as “Pageviews.” With WP Google Analytics, you can choose to ignore certain users’ visits. The plugin separates users by their roles. You can learn more about user roles, and how to change user roles, here.
Custom Variables: For the more advanced users out there, you may want to create custom segments, such as viewing reports in different segments such as by author, category, or tags. You can learn more about how to create custom variables here. With WP Google Analytics, use tokens in your custom variables to make your fields dynamic based on context. Here are some of the tokens you can use:
|%the_author%||Post author for current view||Post author’s display name|
|%the_category%||Categories assigned to a post||Category names in a commma-separated list|
|%context%||Which view the visitor is on||Samples: ‘home’, ‘category’, ‘post’, ‘author’|
|%the_date%||Publication date for the current view||Format specified by ‘Date Format’ in Settings -> General|
|%the_tags%||Tags assigned to a post||Tag names in a commma-separated list|
|%is_user_logged_in%||Whether or not the viewer is logged in||‘true’ or ‘false’|