Skip to content

Commit

Permalink
chore: add ga and color to identify each context
Browse files Browse the repository at this point in the history
  • Loading branch information
tassioFront committed Jul 31, 2021
1 parent 9ca78a3 commit e994d59
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
15 changes: 15 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,27 @@
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZNWHZ7P8QC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-ZNWHZ7P8QC');
gtag('event', 'root - action', {
'event_category': '<category>',
'event_label':' <label>',
'value': '<value>'
});
</script>
</head>
<body>

<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>

</html>
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export default {
],
}),
mounted() {
// console.log("root", this.$store);
console.log("root", this.$store);
this.$store.dispatch("user/setUser", { usuario: "teste" });
console.log("mounted - App.vue - root");
console.log("%c mounted - App.vue - root", "color: #bada55;");
},
methods: {
changeMenuState() {
Expand Down
9 changes: 9 additions & 0 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ import store from "./store";
import userConfig from "./helper-modules/user.module";
import emitters from "store/emitters";

const FeatFlag = Vue.extend({
computed: {
$mode() {
return "Mode";
},
},
});
Vue.mixin(FeatFlag);

Vue.config.productionTip = false;
Vue.use(VueRouter);

Expand Down
3 changes: 2 additions & 1 deletion src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export default {
mounted() {
emitters.helpers.listen(emitters.EVENT_KEYS.USER, () =>
console.log(
"listen - root Menu - called from root: ",
"%c listen - root Menu - called from root: ",
"color: #bada55;",
(this.user = emitters.helpers.userData().name.first)
)
);
Expand Down

0 comments on commit e994d59

Please sign in to comment.