coordination with adserver

Answered

Comments

7 comments

  • Hi Elizabeth,

    Please check this article: https://support.cookiebot.com/hc/en-us/articles/360003812773-AdSense-cookie-consent. The approach seems to be similar.

    You can also use the Cookiebot JavaScript API, which could also be an option: https://www.cookiebot.com/en/developer/, but that depends on how your scripts look.

    If you can implement it, provide your credentials for FTP and Admin access to m.georgiev@vconnect.dk and we can check it up.

    Regards,
    Martin

     

    0
    Comment actions Permalink
  • Avatar
    Elizabeth Stapel

    I know almost nothing about scripting, so I wasn't able to figure out how to use the API. I mean, yes, I can hide content, but I couldn't figure out how to apply the "standard cookie handling" scripts (or even where to put them).

    When you reference the AdSense-cookie article, are you suggesting that the script calls, currently residing in the adserver, have the same changes made to them? I was hoping for a means of zone-based integration, so that the adserver (being a software package that receives calls from webpages, and serves up ads in the designated slots) would "see" that nothing (scripts, whatever) should be served to those slots in the first place.

    I'm not sure which is the "it" you mention "implementing"...? Are you asking for Admin access to my dedicated server?

    Thank you!

    Eliz.

    0
    Comment actions Permalink
  • Hey Elizabeth,

    Regarding this part:

    When you reference the AdSense-cookie article, are you suggesting that the script calls, 
    currently residing in the adserver, have the same changes made to them?

    No, whatever changes they have done in their system is in order to change how they handle the data in their system.

    The idea is that when customers visit your website and the script from Revive adserver loads, it sets cookies without asking the visitor first if he accepts them. This is were Cookiebot comes in play. You need to find this or these scripts and modify them as the AdSense Cookie consent article suggests.

    This way you will serve the ads only if the customer consents to them.

    You can see more information on implementing prior consent here: step 3 of installation guide and prior consent article

    Regards,
    Martin

    0
    Comment actions Permalink
  • Avatar
    Elizabeth Stapel

    I don't know who is the "they" that you are referencing...? My website is just me: my content; my dedicated server; my ad-network accounts; and my installation of the adserver software on my dedicated server, with a database responding to PHP and Javascript files in order to serve the ad-network scripts stored in the database.

    You say that I should not add the CookieBot tag to the coding for the ads being served (after being called by the adserver) on my pages. But then you say that I should "find this or these scripts and modify them as the" referenced article states. However, that article shows the editing of the actual ad-network script. So I'm confused.

    "Step 3" also shows editing of the actual ad script. The "prior consent" article provides instructions for other software packages, but not for the Revive adserver package.

    The call, within the HTML page, to the adserver consists of a "ins" tag (containing parameters such as the "id" of the "zone") and a "script" tag containing a link to a PHP file. I have tried constructing the "ins" tag within a script containing the check of the CookieBot cookie's value and a call to the PHP file; this resulted in nothing happening at all, regardless of the cookie's value. I then left the "ins" tag outside of the script; this resulted in the ad being loaded every time, again regardless of the cookie's value.

    Thoughts?

    Thank you!

    Eliz.

    0
    Comment actions Permalink
  • Avatar
    Elizabeth Stapel

    I think I've found a solution:

    I had created a Javascript which correctly determined the value of "marketing": "true" or "false", or "false" because the cookie's value is "0", or "false" because the cookie hasn't yet been set. This script, in the <head> of my webpage, works just fine.

    I had been trying to pass the value returned by my Javascript to the adserver when the [name js].php file was being called within my webpage. I could find nothing that worked, because the adserver had already displayed ads (with cookies) before CookieBot and my Javascript had finished their dance.

    At some point, though, I noticed that, though my webpage was calling [name js].php, the browser was "seeing" [name].js, which was called (and partially created by?) the [name js].php file. So I took a closer look at the [name].js file.

    When looking at the github "development" version of [name].js (where the coding is broken up into legible loops, functions, etc), I noticed that there was a comment to the effect of "if [this particular variable] in the following 'if' statement is set to 'false', then no ad will be displayed at this location in your webpage".

    So, since apparently [name].js was the file that "mattered", I copied my Javascript into [name].js, after the function call but before the "if" statement. Then I added a condition to the pertinent "if" statement: essentially, "if CookieBot says that 'marketing' cookies are not accepted". (In other words, the original conditions for not displaying anything (which I didn't understand and didn't want to mess with) are untouched, but CookieBot's "marketing" value has now been added.)

    I have tested the coding in Internet Explorer, Edge, and Firefox, and it seems to be working correctly. Yay!

    Eliz.

    0
    Comment actions Permalink
  • Hi Elizabeth,

    I apologize, I have misunderstood you.

    Regarding your solution, I'm glad that it works, but unfortunately this might not be the best idea. The problem with it is that if you update the AdServer files at some point you will loose your modifications to the code you have done and you will have to re-do them.

    A better solution would be to find out which script tag is inserting [name].js and mark it up with the cookiebot attribute.This way it won't run and it won't load the [name].js unless the visitor gives consent.

    Regards,
    Martin

    0
    Comment actions Permalink
  • Avatar
    Elizabeth Stapel

    I had managed to get Javascript on my testing page to (1) read the state of "marketing" from the CookieBot cookie and (2) use this to update the "ins" tag for the ad slots. However, since the adserver acted before the Javascript could act, this did not help. Unfortunately, mine is not the only issue caused by the (otherwise laudable) swiftness of the adserver.

    The script within my webpages sending the call to the adserver is [name js].php. It swiftly converts the call to [name].js. There are other files and database variables involved, but I don't understand enough about coding to figure out where else I could have made the necessary changes; I'm not at all certain that there even IS another place where such a change could have been made.

    Yes, I know that I'll have to re-install these changes every time the adserver package goes through another update. But at least now I know how to make that change, and the change is pretty darned simple.

    Success!

    Eliz.

    0
    Comment actions Permalink

Please sign in to leave a comment.