• Resolved Konstatninos

    (@skredlemon)


    I have been contacted by Cookie Yes about the implementation of cookie yes on my site. Although previously it used to work okay, now there seems to be a problem with the order of the gtag loading. Apparently CookieYes needs to load a script of theirs first, then the gtag should run, and after that the second script of Cookie Yes’ should run. Could you help?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out @skredlemon. While I will check this with the team and report back to you here, from previous similar discussions the Analytics snippet as placed via Site Kit should be placed as high up on a site as possible, just before the <head> tag. You’ll find more on this as it related to gtag here.

    It may be possible to use the?$priority?parameter for any snippet placed via either Site Kit or CookieYes, but I will check this with the team first. While I’m doing so, it would be great if you could share your Site Health information so I can check to see if the snippet placed via Site Kit is working as expected. I saw this as we recently tested CookieYes without encountering any issue. There may be some third party plugins active that reformat your scripts and styles within the head of your site.

    Let me know if you have any questions with the above.

    Thread Starter Konstatninos

    (@skredlemon)

    Hi @jamesosborne thanks for the quick response. I highly doubt it could be a plugin conflict as in this domain I run very small a number of plugins, but nonetheless I have submitted the data in the link you shared.

    For the $pirority parameter, this is exactly what I have used for CookieYes to ensure it loads even before the page <title> in the <head> . The first script loads with a priority of -1000 while the second one loads with a priority of -990.

    In other installations where Site Kit is not used I have manually inserted the GTM in between the two with a middle-ground priority, but now in the case of Site Kit I don’t know at what priority the plugin loads its code, or even how to position it before CookieYes’ second script, or where to load the second script of CookieYes for it to run after SiteKit’s code safely.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update @skredlemon. As I don’t want to give you any incorrect information, I’ll have to check this with the team before reporting back to you, most likely at some stage tomorrow. I have been performing some checks both on your site and with regards prioritizing action hooks. From inspecting your site, I can see that a CookieYes script request is printed before the Site Kit snippet.

    I can also see that my visit to your site is not tracking until consent via your CookieYes plugin is granted. After granting consent, this is evident when checking the tagassistant.google.com service. https://i.imgur.com/1TQbNmu.png

    To troubleshoot this further, are you experiencing any particular issue with your CookieYes implementation? I ask as I don’t see any unusual behavior from the checks I performed.

    Thread Starter Konstatninos

    (@skredlemon)

    Thank you @jamesosborne for checking further. Your comments are very reassuring. I am not seeing any unusual behavior, but I received a notification from CookieYes the other day about a misconfiguration on my site.

    Upon checking my code everything seemed fine, like it had been at least for the past 8 weeks (or more). I had to ask them to elaborate on the issue they had reported, and this is when they mentioned the order GTM scrips run with regards to their two scripts. Initially the report was very generic; apparently something was wrong with my implementation.

    I have not performed any more maintenance on the site lately, and they caught me by surprise when they reported that. Previously everything appeared to be working fine, so it must not have been something that we have done on our end. Except if the issue existed from the beginning but the error report was delayed for so long. I don’t know anything about that to be honest.

    Plugin Support James Osborne

    (@jamesosborne)

    Good to know @skredlemon. There’s no harm in reaching out to CookieYes for confirmation that all looks good. I don’t see any issue from my checks, however, there may be some additional configurations they suggest.

    I will still ask the team regarding Analytics script priority and report back to you.

    Plugin Support James Osborne

    (@jamesosborne)

    Just to keep you updated on this, I checked this with the team and we don’t have any filter or option to change the script loading priority within Site Kit. How the snippet is placed is determined by standard script dependency.

    Do let me know if you have any further questions on this. Thank you.

    Thread Starter Konstatninos

    (@skredlemon)

    Hi @jamesosborne thanks for the update.

    I will try to experiment with the $pirority variable for the second script and see how it goes. I reckon if you change the priority values several times you should get it to load after the GTM code has executed, so perhaps this could work. I will ask for advice on CookieYes’ end on the matter.

    When I have a clear answer on this – positive or negative – I will let you know. Please keep in mind I will be out of the office for the next couple of weeks on vacation so I will pass on this ticket to a colleague. In case they get the time to take a look you might here from them on the ticket, otherwise I will get back to you later. Please don’t close this ticket just yet. I will get back to you either way.

    Best regards.

    Plugin Support James Osborne

    (@jamesosborne)

    Not a problem @skredlemon, we can keep this topic open for a couple of weeks. Enjoy your time off.

    Note also that adding a priority doesn’t necessarily mean a snippet placement will work as intended, as I believe dependencies are a factor. I didn’t notice any issue with your CookieYes configuration or with your Analytics tracking. You may wish to reach out to CookieYes to confirm all is working with a correct configuration within their plugin.

    Best of luck!

    Thread Starter Konstatninos

    (@skredlemon)

    That’s what I’ll do @jamesosborne, I’ll contact CookieYes once I get back for further instructions from them. Thank you, I will touch base in two weeks’ time.

    Plugin Support James Osborne

    (@jamesosborne)

    Hi @skredlemon. I’m just following up with you to check whether you’ve had a chance to review your CookieYes configurations, with all working as expected?

    Thread Starter Konstatninos

    (@skredlemon)

    Hi @jamesosborne, thank you for checking in. I have contacted CookieYes, and I am still waiting for their reply. I guess, I should have heard from them by the end of the week. Would you mind keeping the thread alive a little bit longer?

    Thread Starter Konstatninos

    (@skredlemon)

    Hi @jamesosborne, I have been contacted by CookieYes, and they have confirmed that upon checking our setup again, it appears to be in good order after all. In the meantime I did not perform any changes as compared to the state of the site when this issue was initially reported. I don’t know whether this was a false positive on their behalf – or what else – but today they commented I wouldn’t need to change anything.

    I apologize for having you go through all the trouble to check everything, and I appreciate the effort you put into assisting us with this investigation.

    Best,
    Konstantinos.

    Plugin Support James Osborne

    (@jamesosborne)

    Glad to hear it @skredlemon, and absolutely no issue with regards me performing some checks. That’s what we’re here for! If you have any further queries, be sure to reach out. If you have a moment free please also consider leaving a review given you’re a Site Kit user for multiple sites. We’d love to hear your feedback.?

    Best of luck.

    Thread Starter Konstatninos

    (@skredlemon)

    Thanks for bringing it up. I’ve left you a review as well. Thanks again!

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.