mirror of
https://github.com/prymitive/karma
synced 2026-05-09 03:36:44 +00:00
feat(demo): add Google analytics to the demo
This will allow testing customization assets feature
This commit is contained in:
@@ -17,6 +17,7 @@ COPY demo/alertmanager.yaml /etc/alertmanager.yaml
|
||||
COPY demo/generator.py /generator.py
|
||||
COPY --from=go-builder /go/src/github.com/prymitive/karma/karma /karma
|
||||
COPY demo/karma.yaml /etc/karma.yaml
|
||||
COPY demo/custom.js /custom.js
|
||||
RUN adduser -D karma
|
||||
USER karma
|
||||
CMD supervisord --nodaemon --configuration /etc/supervisord.conf
|
||||
|
||||
23
demo/custom.js
Normal file
23
demo/custom.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// https://developers.google.com/analytics/devguides/collection/analyticsjs/
|
||||
(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-128338979-1", "auto");
|
||||
ga("send", "pageview");
|
||||
@@ -8,6 +8,8 @@ alertmanager:
|
||||
annotations:
|
||||
hidden:
|
||||
- help
|
||||
custom:
|
||||
js: /custom.js
|
||||
filters:
|
||||
default:
|
||||
- "@receiver=by-cluster-service"
|
||||
|
||||
Reference in New Issue
Block a user