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

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).

Related

Installing Google tag manager, google optimize and google analytics together on a website?

Recently I have been working on a project that requires GTM, GA & GO to be installed on a website.
Is there an optimal way to install all 3 onto the website without requiring copying of 3 individual code spinnets?
If we do require 3 individual code spinnets, What is the correct order to place the spinnets?
Not having to install multiple separate snippets is pretty much the point of a tag management system.
Create a Google Tag Manager Container and install the code snippet in the head of your page (that is the recommendation, but it will work pretty much everywhere else).
Then go to your container settings. In "Tags", click new. You will see tag templates for both Google Analytics (both Universal Analytics and GA4) and for Google Optimize (Documentation for Optimize with GTM is here, although it is slightly confusing). Basically you create a tag with the respective template, drop your tracking ids in, create a trigger that says when the tag will be executed and then publish your container.
You might want to have a look at the online courses Google offer for GTM: https://analytics.google.com/analytics/academy/course/5 to make best use of GTM.

How to track Google Play download sources

I can't find the simple answer for a simple question. I want to generate a link to my app on Google Play and check how many installs comes from this link.
For iOS this is very simple, you just go to the analytics ->sources and generate a link that has a parameter. I can't find anything like that in Google Play Developer Console. Am I missing something or there is not such option for GP?
You could use Firebase Dynamic Links.
More information here: https://firebase.google.com/docs/dynamic-links
You can create Dynamic Links using your own domain name:
https://example.com/summer-sale
https://example.com/links/promos/summer-sale
https://links.example.com/summer-sale
https://ex.amp.le/summer-sale
Or, if you don't have a domain for your app, you can use a free custom page.link subdomain:
EXAMPLE LINK: https://example.page.link/summer-sale
Create your free subdomain in the Firebase console.
All Dynamic Links features, including analytics, post-install attributions, and SDK integrations, work with both custom page.link domains and your own domain.

Recommended way to check Google Analytics is running correctly on every page (wordpress)

I have a Wordpress site that has multiple plugins & that has somehow over time got the same Analytics tracking link (albeit slightly different implementations of it) in a few places on the site.
I want to remove one of them so the site 'touch wood' only uses a single tracking link throughout, is there a website scanning tool or desktop application that will scan an app and help me find each location of this tracking link?
Used the Google Tag Assistant for Chrome extension

Google analytics in Wordpress subdirectory

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.

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.

Resources