Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
whats-open-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
whats-open-web
Commits
983cd722
Commit
983cd722
authored
Aug 28, 2018
by
Andrew Hrdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed matomo, fully removed GA
parent
b53bfa9b
Pipeline
#2787
passed with stage
in 1 minute and 50 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
27 deletions
+29
-27
CHANGELOG.md
CHANGELOG.md
+12
-1
public/index.html
public/index.html
+17
-2
src/analytics/matomo.js
src/analytics/matomo.js
+0
-19
src/index.js
src/index.js
+0
-5
No files found.
CHANGELOG.md
View file @
983cd722
# Changelog
## [2.1.4] - 2018-08-28
### Added
-
Basic matomo analytics for tracking page views
### Removed
-
Google analytics
## [2.1.3] - 2018-05-24
### Fixed
...
...
@@ -57,4 +67,5 @@
[
2.1.0
]:
https://git.gmu.edu/srct/whats-open-web/compare/v2.0.1...v2.1-Midnight-Cherry
[
2.1.1
]:
https://git.gmu.edu/srct/whats-open-web/compare/v2.1-Midnight-Cherry...v2.1.1
[
2.1.2
]:
https://git.gmu.edu/srct/whats-open-web/compare/v2.1.1...v2.1.2
[
2.1.3
]:
https://git.gmu.edu/srct/whats-open-web/compare/v2.1.2...v2.1.3
\ No newline at end of file
[
2.1.3
]:
https://git.gmu.edu/srct/whats-open-web/compare/v2.1.2...v2.1.3
[
2.1.4
]:
https://git.gmu.edu/srct/whats-open-web/compare/v2.1.3...v2.1.4
\ No newline at end of file
public/index.html
View file @
983cd722
...
...
@@ -32,13 +32,28 @@
<link
rel=
"shortcut icon"
href=
"%PUBLIC_URL%/favicon.png"
>
<link
href=
'https://api.tiles.mapbox.com/mapbox-gl-js/v0.40.1/mapbox-gl.css'
rel=
'stylesheet'
/>
</head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
src=
"https://www.googletagmanager.com/gtag/js?id=UA-112607180-1"
></script>
<body>
<script
type=
"text/javascript"
>
/*
The following code is generated by matomo to use for analytics.
*/
var
_paq
=
_paq
||
[];
_paq
.
push
([
'
trackPageView
'
]);
_paq
.
push
([
'
enableLinkTracking
'
]);
(
function
()
{
var
u
=
"
//matomo.srct.gmu.edu/
"
;
_paq
.
push
([
'
setTrackerUrl
'
,
u
+
'
piwik.php
'
]);
_paq
.
push
([
'
setSiteId
'
,
'
2
'
]);
var
d
=
document
,
g
=
d
.
createElement
(
'
script
'
),
s
=
d
.
getElementsByTagName
(
'
script
'
)[
0
];
g
.
type
=
'
text/javascript
'
;
g
.
async
=
true
;
g
.
defer
=
true
;
g
.
src
=
u
+
'
piwik.js
'
;
s
.
parentNode
.
insertBefore
(
g
,
s
);
})();
</script>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div
id=
"root"
></div>
</body>
...
...
src/analytics/matomo.js
deleted
100644 → 0
View file @
b53bfa9b
export
const
initMatomo
=
()
=>
{
const
_paq
=
_paq
||
[];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq
.
push
([
'
trackPageView
'
]);
_paq
.
push
([
'
enableLinkTracking
'
]);
const
u
=
'
//matomo.srct.gmu.edu/
'
;
_paq
.
push
([
'
setTrackerUrl
'
,
`
${
u
}
piwik.php
`
]);
_paq
.
push
([
'
setSiteId
'
,
'
2
'
]);
const
newScriptTag
=
document
.
createElement
(
'
script
'
);
const
firstScriptTag
=
document
.
getElementsByTagName
(
'
script
'
)[
0
];
newScriptTag
.
type
=
'
text/javascript
'
;
newScriptTag
.
async
=
true
;
newScriptTag
.
defer
=
true
;
newScriptTag
.
src
=
`
${
u
}
piwik.js
`
;
firstScriptTag
.
parentNode
.
insertBefore
(
newScriptTag
,
firstScriptTag
);
};
\ No newline at end of file
src/index.js
View file @
983cd722
...
...
@@ -2,7 +2,6 @@ import React from 'react';
import
ReactDOM
from
'
react-dom
'
;
import
{
applyMiddleware
,
compose
,
createStore
}
from
'
redux
'
;
import
'
./index.css
'
;
import
{
initMatomo
}
from
'
./analytics/matomo
'
;
import
Layout
from
'
./containers/Layout
'
;
import
registerServiceWorker
from
'
./registerServiceWorker
'
;
import
createHistory
from
'
history/createBrowserHistory
'
;
...
...
@@ -27,10 +26,6 @@ if (isProduction || !extension) {
enhance
=
compose
(
applyMiddleware
(
ReduxThunk
,
routerMiddleware
(
history
)),
extension
);
}
if
(
isProduction
)
{
initMatomo
();
}
const
store
=
createStore
(
reducers
,
enhance
);
ReactDOM
.
render
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment