Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Criteo integration help needed

Open mjwhaley opened this issue 10 years ago • 12 comments

Does anyone managed to get Criteo up and running with PreBid. I'm struggling massively and Criteo don't seem to have any answers either.

mjwhaley avatar Dec 17 '15 18:12 mjwhaley

@jdelhommeau do you have an example of Criteo you could provide?

mkendall07 avatar Dec 18 '15 21:12 mkendall07

@mkendall07 I have spoken to Criteo and they have no idea how to set them selves up with Prebid. It obviously works somehow.

I have a RTA account with Criteo and have all the details to fill in as below

bidder: 'criteo', params: { nid: "TO ADD", cookiename: "cto_test"

But what i'm trying to work out is what happens from there

Do I have to setup an extra key value crtRTA in DFP? and then use their ad tags.

Any help would be amazing. Thanks in advance.

Also, when will the new update be released? I'm hoping to get AOL live at this time.

mjwhaley avatar Dec 18 '15 21:12 mjwhaley

@mjwhaley: so multiple way to do that:

You only let prebid.js take care of calling rta, by setuping the criteo adaptor with the right nid and others needed params. That way rta is called, cookie and windows variable are created as usual and you can keep your current integration code to add the rta keyword in your ad call. Criteo will need a dedicated line item in your adserver.

Second method: instead of using the standard setup for passing criteo keyword, you define the bidderSettings, specific for criteo and choose alwaysUseBid: true, you can also play with the keys to pass in the information as you want (criteo=yes/no, or the sizes available). Prebid.js will then automatically add the criteo bid all the time. You still need a dedicated line item in your adserver.

~~Last method: you use the newest feature from prebid which allow you to redefine the CPM prior to bid evaluation. Let say you have a fixed deal with criteo and they take your impressions for 2$. Then in the function that redefine the CPM value you return 2$ if criteo has an ad, 0 if not. It means you have to expose your fee, which I understand can be an issue but the up side is that you don't require a dedicated line item.~~

Let me know if this is unclear. Happy as well to help you if you have a test page.

jdelhommeau avatar Dec 19 '15 08:12 jdelhommeau

@jdelhommeau Thanks for your help, its greatly appreciated.

I have created a test page here http://streamamp.co.uk/streamamp-criteo/

I have DFP setup as per the Criteo instructions. Targeting the key value of crtRTA and then the publisher specific values. I have pushed the campaign to sponsorship to help stop dynamic allocation taking any impressions during the testing phase.

You will see that I have located the main script on the Amazon CDN and on the test page you will only find a link to it.

Any additional direction would be massively helpful. I'm happy to create a simple PDF of instructions for others if that would be helpful.. assuming I can get it to work. :-)

mjwhaley avatar Dec 19 '15 16:12 mjwhaley

@mjwhaley : Okay I see the test page and I found the issue. By default, criteo ask you to use a variable named "crtg_content" which will contains the keyvalue form criteo to target. This variable name might actually be different from crtg_content. This is defined when calling the rta script. In your case, using prebid.js, the name of the variable is crtg_varname

you can see it in the rta call being made, at the end:

http://rtax.criteo.com/delivery/rta/rta.js?netId=4905&cookieName=crtg_rta&rnd=23989005712&varName=crtg_varname_4905

So to fix this, you have two solutions:

prebid.js should be able take the var name as a parameter of the criteo ad unit setting. Something like this:

{ //728x90
code: 'div-gpt-ad-1450518731192-0', sizes: [[468, 60], [728, 90]], bids: [{ bidder: 'criteo', params: { nid: "4905", cookiename: "crtg_rta", varname: "crtg_content" } }] }

However, the version with this parameter has not been released yet (@mkendall07, any idea when we will release it?). So if you want to use this right now, you need to update slightly current prebid code. You just need to replace line 352 of your high.js file :

var varname = 'crtg_varname_' + bid.params.nid;

by this:

var varname = bid.params.varname;

Doing those two changes (adding varname: "crtg_content" in criteo config and changing the line 352 in high.js) should fix it.

Let me know if that works for you.

best Regards, Julien

jdelhommeau avatar Dec 22 '15 09:12 jdelhommeau

Thanks Julien

I made those changes and you can see them here http://streamamp.co.uk/streamamp-criteo/

But sadly its looking like they broke something. Did I miss something? @jdelhommeau

mjwhaley avatar Dec 22 '15 09:12 mjwhaley

@mjwhaley No big deal, is just seems you forgot the "," (coma) in the bidder configuration after cookiename: "crtg_rta": params: { nid: "4905", cookiename: "crtg_rta" varname: "crtg_content" }

should be:

            params: {
                nid: "4905",
                cookiename: "crtg_rta",
        varname: "crtg_content"
            }

jdelhommeau avatar Dec 22 '15 09:12 jdelhommeau

Sadly this is what happens when CEO's try to code. I thought I was doing so well too. Thanks for your help here @jdelhommeau. Its working lovely now.

mjwhaley avatar Dec 22 '15 10:12 mjwhaley

@jdelhommeau; Are you sure about the last implementation method that you mention here https://github.com/prebid/Prebid.js/issues/140#issuecomment-165959724 ?

AFAIK the creative that would be served in that scenario would call renderAd(document, '%%PATTERN:hb_adid%%'); but prebid.js doesn't know how to render Criteo ads. It doesn't know how to link a keyvalue (which is returned in crtg_content) to a zone id (which is in the tags supplied by Criteo).

Without changing the Criteo adapter in prebid.js I don't see how Criteo can be implemented without one dedicated line-item per zone.

BartVB avatar Dec 22 '15 13:12 BartVB

@BartVB

Thanks for pointing that out. I think you are correct. Do you have a suggestion on how prebid.js could wrap the ad renderer implementation for Criteo? It's been on our backlog for awhile but we haven't started yet to provide a custom interface for ad rendering.

Thanks

mkendall07 avatar Dec 22 '15 16:12 mkendall07

@BartVB : you are right. Latest method would require custom renderer for criteo, as pointed out by @mkendall07 . Sorry about that.

jdelhommeau avatar Dec 22 '15 16:12 jdelhommeau

Closing this with discussion moved to #153.

protonate avatar Feb 04 '16 23:02 protonate