Google Analytics for TaskMuncher
by John Vincent
Posted on May 12, 2018
This is part of a series of discussions regarding Deploying to a Digital Ocean Droplet.
For more details, please see Deploy TaskMuncher
Google Analytics for TaskMuncher
https://analytics.google.com
Admin
Create Account
Login
Admin
Account (list with a drop-down)
From drop-down
* Create new account.
Track: Website
Account name: taskmuncher
Website name: taskmuncher
Website url:
https
www.taskmuncher.com
- Get Tracking Id
- Shows Website Tracking Code:
- Copy the code
Add to Google Analytics Template
Two choices
Global Site Tag
Copy the Website Tracking code and paste into
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-118266911-1');
</script>
Paste this code into head tag before any other script or CSS tags
JavaScript tracking snippet
Copy the Website Tracking code and paste into
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
Change
https://www.google-analytics.com/analytics.js
to
https://www.taskmuncher.com/analytics.js
Paste this code into head tag before any other script or CSS tags
Restart Nginx
sudo systemctl restart nginx
pm2 restart all
Review Google Analytics Data
Login
List Accounts
Select All Web Site Data
Google Analytics
Taskmuncher
- Backup TaskMuncher from Digital Ocean
- Configure HTTP Nginx
- Configure HTTPS Nginx
- Configuring Google Domains
- Configuring Meta Tags
- Create Site Map
- Create SSL Certificates
- Create Ubuntu Droplet at Digital Ocean
- Deploy TaskMuncher React App to AWS
- Facebook Application Id
- First time deploy TaskMuncher React App to Digital Ocean
- Google Analytics for TaskMuncher
- Google Authentication
- Google Gmail Configuration
- Google Webmaster Tools
- Install Ubuntu Mongo
- Install Ubuntu Nginx
- Mailgun
- Maintaining Ubuntu Droplet
- Material-UI Showcase
- Optimizing TaskMuncher with Webpack 4
- React Production Issues
- TaskMuncher Images and Favicons
- TaskMuncher Overview
- TaskMuncher Performance
- TaskMuncher Website Validation
- Update SSL Certificates
- Update TaskMuncher for Lighthouse Findings
- Update TaskMuncher to be a Progressive Web App
- Update TaskMuncher to use React BrowserRouter
- Update TaskMuncher to Webpack v4, Babel v7, Material-UI v3