• Hi team, i am using your plugin since few weeks. but i am facing one issue.
    what i am doing is, I am placing ga.js (for analytics) and https://googleads.g.doubleclick.net (for adsense) in script block without <script>…</script> But unfortunately both script are not executing after accepting consent.

    when i checked page source, its wrapping around your cookie check but script is not being parsed.
    So, Please let me know the correct solution.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Hi @sudhir600,

    I can’t check your site, as it is blocking the country I’m working from. But I might be able to help you anyway:

    You have probably placed it in this section:
    Other scripts used to activate cookies
    But this is only used for actual script code, not for resources/URL’s.

    You can add the URL of the doubleclick script in the script center, specifically this section:
    URL’s from scripts you want to be blocked before the cookie warning is accepted (Optional)

    The plugin has a built in Google Analytics feature, which I recommend to use. Then the ga.js will get loaded automatically, and analytics enabled on acceptance. If you do not want to use this feature, you can add it like the doubleclick script.

    As this is a doubleclick is a much used service, I’ll add it to the core in the next update as well, after which it will get blocked by default.

    Let me know if you have any questions about this!

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Did you get this working with the suggestions? Let me know if you need any assistance.

    Thread Starter Sudhir Kumar Gupta

    (@sudhir600)

    Hi @rogierlankhorst

    I tried exactly as you mention above but only script code excuted but resource url (.js) not. see for testing i have added one js file at <a href="https://example.com/hindi/test.js" rel="noopener noreferrer" target="_blank">https://comedymood.com/hindi/test.js</a> that will print simply a console.log.

    I added this script inside “URL’s from scripts you want to be blocked before the cookie warning is accepted (Optional)” but unfortunately it didn’t execute.

    See, If i will tweak like load resources in header.php and then put javascript piece of code in 1st block then my problem will solve. But, I know that’s wrong approach.

    Lets say, some of user didn’t accept then what the point to load external file. (its waste of bandwidth and slower the site). so my approach is, i will put google adsense code in 3 places in a page (bcz i want ads on custom places) and when user accept the consent “//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js” will load.
    make sense?

    I have few more plan but not sure, your plugin will support or not?
    I have few more ad partner who serve non targeted ads, So i will show these ads before consent and once consent received, google adsense will be loaded.

    However, Please tell me you country so that i can enable access for you.

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    We’re located in the Netherlands. Can you submit a ticket at https://complianz.io/support?

    Thread Starter Sudhir Kumar Gupta

    (@sudhir600)

    I have enabled access for you. you can check my site and code.
    Sor ticket, sure, i will raise tonight.

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    I still can’t view the site. If you post the support ticket I can send you my ip details.

    Thread Starter Sudhir Kumar Gupta

    (@sudhir600)

    I try to submit ticket (with and without logging) but your site doesn’t work. keep showing “please wait”….

    Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi Sudhir,

    We received your ticket a while ago and responded, so I am putting this as resolved. Please use a new topic, for new (support) questions. Thanks!

    Regards Aert

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘GA and adsense not loading if code is inside blocks’ is closed to new replies.