Closed andreasba closed 7 years ago
Thanks for your issue. I implement that now.
Sorry to re-open this @rokde but I manually set
Analytics::disableScriptBlock();
for every event or tracking like this
// Lets fire off an GA event that a user has logged out
Analytics::disableScriptBlock();
Analytics::trackEvent('Account', 'Logout', $event->user->id);
But it still renders the JS block. Because in my layout I still have
{!! Analytics::render() !!}
So it seems like it doesnt work?
If I may, I would also suggest to make this available as a config setting too. I for example wouldnt have to set the disable roughly 40 times but only one then :-)
Thanks Andreas
Maybe the singleton problem with the facade. If you use it via dependency injection all works fine.
I'll check that soon. The config item is a really good advice. I will implement this too.
Is there anything I can help you with (except code it, which I am not good enough to do :-)? I can test beta stuff if you like
Thank you @andreasba for your support. We have too much to do right now. So you can test the current code if the communicated problem is in all dependencies existent. At our tests nothing failed - so you can try to find the situation there this happened. Thanks in advance!
I made and PR'd a config variable for disabling script blocks by default.
Hope that resolves your issue @andreasba :)
This should solve your problem. Please re-test with version 1.3.4 @andreasba .
Please reopen an issue if it does not work for you @andreasba .
Hi there
thanks for this great package :-)
I have a suggestion: at the moment, if you
the package renders the whole thing, including the JavaScript tags:
My suggestion would be to provide an option to disable this, so that only the tracking code is rendered, like this:
The reason for this is that I want to comply with the EU cookie law and thus if the user does not accept cookies, I am not using Google Analytics. For example, I use CookieBar (a jQuery Plugin) like this:
Which of course does not work :-)
I think that this is a feature which a lot of people might already require or will require, so I thought I'd ask :-)
Thanks Andreas