Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

return [
'production' => false,
'matomo_container' => 'Ux1Y5m98_dev_08f02616a270a3d80b35beb7',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value, could be in the .env document?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea.
Thinking more about....
This isn't a secret and stay and is the developer value. If we put at an env file will be a bit more hard to share this value.

'baseUrl' => '/',
'title' => 'LibreCode',
'description' => 'Cooperativa de tecnologia da informação especializada em desenvolvimento de soluções com licença livre.',
Expand Down
1 change: 1 addition & 0 deletions config.production.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

return [
'production' => true,
'matomo_container' => 'Ux1Y5m98',
];
25 changes: 10 additions & 15 deletions source/_layouts/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@
<!-- <script src="contactform/contactform.js"></script>-->
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
@yield('footer_scripts')
<script>
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
(function() {
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true;
g.src='https://matomo.librecode.coop/js/container_{{ $page->matomo_container }}.js';
s.parentNode.insertBefore(g,s);
})();
</script>
@if ($page->production)
<script type="text/javascript">
(function(w, d, s, u) {
Expand All @@ -66,21 +76,6 @@
h.parentNode.insertBefore(j, h);
})(window, document, 'script', 'https://chat.librecode.coop/livechat');
</script>
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.librecode.coop/";
_paq.push(['setTrackerUrl', u+'matomo.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+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript>
<img src="https://matomo.librecode.coop/matomo.php?idsite=2&amp;rec=1&amp;action_name={{ $page->getUrl() }}" style="border:0" alt="" />
</noscript>
@endif
<script>
var lightbox = GLightbox();
Expand Down