Opt in doesn't start analytics

Issue #11 resolved
Julia van Montfort created an issue

When a user clicks to accept cookies, the script for Google analytics isn't started. This script is added in concrete5 > Dashboard > SEO > tracking codes while your description implies that when someone consents to the use of cookies all tracking should continue. I use concrete 5 8.1.0.

Comments (8)

  1. Julia van Montfort reporter

    Hi Fabian, thanks for your reply. I did find the problem, just not the solution. It's because the function getServiceUrl() in cookiedisclosure doesn't get the right url of the page on sasmabv.com: Screen Shot 2018-05-23 at 22.30.35.png So the optIn function wants to get something from domain.com/?cID=/optIn instead of domain.com/en/eu_cookie_law/optIn Can it be because we have a multilingual concrete5 installation?

  2. Fabian Bitter repo owner

    Hi Julia, yes. That seems to be the problem. I will test it, fix it (when i am able to reproduce) and give you feedback here. Fabian

  3. Fabian Bitter repo owner

    Hey Julia,

    I have tested it. Unfortunately i am not able to reproduce.

    See here:

    Bildschirmfoto 2018-05-23 um 23.43.35.png

    Bildschirmfoto 2018-05-23 um 23.43.19.png

    But i have a assumption. Could you change one line of code and then uninstall + reinstall the add-on?

    Please change packages/eu_cookie_law/controller.php, line 107 from:

    $singlePage = SinglePage::add($path, $pkg);
    

    to

    $singlePage = SinglePage::addGlobal($path, $pkg);
    

    After change the file please uninstall + install again.

    Let me now if that solves the problem that i will fix it.

    Thank you Fabian

  4. Julia van Montfort reporter

    That fixed it, thanks a lot for your quick replies and solution! This solution has only one tiny thing; somehow the cookie settings disappeared in the dashboard. I can access it by going to Single Pages and clicking the eu cookie law dashboard page so it's not a problem for me, but just so you know :)

  5. Log in to comment