Google analytics in Wordpress subdirectory - wordpress

I am converting over a static site to Wordpress. Wordpress is installed in a subdirectory. What I'd like to know is how to add the subdirectory to the current Google Analytics report. I have tried adding both Google analytics asynch and ga.js code into the existing embed code according to the instructions as outlined here-
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#domainSubDomains
...and it isn't showing up on the dashboard.
Is there a straightforward methodology or tutorial for doing this?
Incidentally, I've tried using a plugin to integrate Google Analytics into the site, but it's only showing me the current analytics, without an option for the subdirectory. So, I'm assuming the embed code needs to be modified.
Any help would be appreciated.

Related

How to link Google Analytics account to wordpress

I have read multiple tutorials on web but I'm unable to find my tracking I'd/code on my Google Analytics property list. This is the image which I got from web and I want to see m Any help will be appreciated.
You can simply use any plugin out there. Here are some of my favorites:
Google Site Kit. <== This is the official Google Plugin
MonsterInsights
ExactMetrics
GA Google Analytics <== Simplest and just for this purpose. No unnecessary code.
Note: There are many others but these are per my favorites list and liking.
1st plugin will auto-connect with your google account and you won't need to put any ID or code into your site manually. Hence easy to set up.
Site Kit by Google is great for WordPress users. By using Site Kit you don't need to manually insert the code, as depicted by the screenshot you share. The plugin can insert the code for you.
In addition to the placement of code, Site Kit can show you Analaytics and other data within your wp-admin dashboard!

Add visitor count and analytics to R blogdown > netlify housted website

I am creating my personal website (here) using R blogdown (using a Hugo template).
The site is hosted on github and I managed get it to continously integrated with netlify.
I would like to keep track of some visitor analytics.
How can I add a visitor count and some sort of visitor analytics tool?
Can the Netlify be integrated with google analytics or some similar tool?
The blogdown guide has a how-to section detailing how to incorporate Google Analytics for your blogdown page. The example in the documentation using one theme, Xmin, but should be transferable to other Hugo blogdown themes. I have followed it for my own blogdown site.
Add the following snippet to your code in layouts/partials/foot_custom.html that lives under the root directory of your page
{{ template "_internal/google_analytics.html" . }}
Then configure the googleAnalyticsfield in your sites config.toml with your GA credentials.
The blogdown author Yihui details these exact steps in this PR here.
Disclaimer: I work for Netlify.
There are no built-in analytics or other visitor logging at present on our service, so google analytics is a good bet. The New Relic browser agent is another option you can use in the same way. They both count on browsers to run javascript and allow tracking, so the numbers they report should be taken with a grain of salt.
The intended path, though by no means the only one, is to place your GA tags or other code you need to inject into every html page into the injected snippets section on your Build & Deploy settings page.
Note that there is some advanced usage potential around deploy-time conditionals like Branch-dependent variables that isn't immediately obvious. You can see it demonstrated in this article on split testing (the conditionals are usable without split testing).

Implementing Google Analytics and Google Tag Manager tracking codes on a Wordpress site with Personal plan

I have a Wordpress website and have the Personal plan.
My goal is to implement the tracking code of the Google Tag Manager on each site.
When I am on the Wordpress site in the HTML view, I should be able to paste one tracking code as close to the opening <head> tag as possible on every page of my website but this is not possible.
That´s why I had a talk with somebody from the Wordpress Support team and their answer was the following:
I believe the code for Google Analytics is meant to go in the header of the site. Since WordPress.com is a fully managed environment, we don't have access to the header code.
Instead, we have a built in Google Analytics option available as part of the Business upgrade.
The issue is I don´t want to spend 25$ a month just to have Google Analytics integrated on my website. There must be also a way for somebody like me with a Personal plan to implement the tracking codes.
When I tried to implement them, they were not hidden on the website which should not be the case (because "hidden" is in the code).
Did anybody of you have the same issue like I am facing?
P.S.: There are also Plugins for Google Analytics but with my plan I can´t upload any Plugins. :/
I integrated the code on a text widget. It worked just fine. If you dont give title to the widget, its even completly invisible. so dont spend unecessary money

Google Analytics Tracker showing Tracking Not Installed

Using wordpress, I manually inserted the tracking code given to me by Google Analytics just before the tag into my header.php file. Google Analytics is still showing Tracking Not Installed.
here's the source code for my site:
view-source:http://funnykittenmemes.com/
Any ideas?
It looks like the javascript is broken from cutting and pasting.
Easiest thing to do is use a plugin rather then edit theme files. Take a look at http://wordpress.org/plugins/search.php?q=google+analytics for any number of plugins - simple to complex - that will work.
Most you simply enter your Google ID - and sometimes authenticate with your Google account - and the plugin takes it from there.

Google Analytics not tracking a Wordpress directory

Just wondered if there is a known issue with GA having trouble tracking a site which has a Wordpress directory?
It seems to be able to track all of my other pages on the site, but we have a /news/ directory which is powered by Wordpress and it doesn't pick this up at all. It is obviously an issue with the fact that this directory is a Wordpress blog, but there must be a way to track it with all of the other pages.
Aaahhh... Sounds like the google analytics tracking code is present on your main site pages, but is not included in the wordpress template that's applied to that sub-section of your site.
The GA tracking code must be visible to google on every page you want to have tracked.
Try 'View Source' in your browser, and check wether the analytics tracking code is present.
If not, you could hard-code the GA tracking code in, or use one of the free WordPress Plugins to do it for you, like 'Google Analytics':
http://wordpress.org/extend/plugins/googleanalytics/
Hope this helps - post back if you're still having problems!
Rick
It may not be related, but did you check if your blog is indexable? Under Settings -> Privacy you can check if its enabled.
Another option is to install a google analytics plugin for the blog. If you enter the same credentials from your already-in-use GA it should be combined. I'm using this one on my blog and its working.

Resources