-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Native] Special characters on body / image / title from prebid.js to DFP #2854
Comments
Thanks for the bug report. Would you mind opening a PR to resolve? |
Thanks for the feedback, I never opened a pull request. I'll try to do it. |
FYI, we built our own Prebid.js including encodeURIComponent on native key (impact on utils.js and targeting.js). So that we can decode them on DFP Native style and use a document.write to render the native ad. |
@haroldpussat , have you opened a pull request for this change? |
#3224 is an attempt to fix this. |
Type of issue
Question
Description
We are testing native implementation from Prebid.js (1.16-pre). For this I create a simple test page with a native slot (size 1&1) and a simple mediaType declared as native. There is only appnexus in competition for the native slot.
I also create a native format and style on our DFP account.
What I see on my console is I get answer from Appnexus with "special characters" such as "€", "!", "*" and so on
For example :
DFP troubleshooting tool show me the same native body value
But I'm not able to display the body content from a simple native format / style (based on http://prebid.org/adops/setting-up-prebid-native-in-dfp.html).
I put some console trace on my native style and it says body / image are empty
`
console.log("HPU Version Nativ 1.0e");
As a result, the native ad is not displayed correctly
So I updated the targeting.js from prebid in order to add a fixed encodeURIComponent on the value targeted value to DFP (see function : setTargetingForGPT)
On the native style, I also add decodedURIComponent for body, brand, title and image. With those changes,
I'm able to display the native ad on the test page
Steps to reproduce
1 - Prebid.js 1.*
2 - A native ad with body / image / title including with special characters such as "€", "!" or "*"
I don't know if I missed something on the implementation (on prebid or dfp setup) or if I'm mistaken or if it's a lack of knowledge or if it's a documentation issue
Test page
With prebid.js 1.16-pre :
http://www.precom-multimedia.com/interne/hpu/test_nativ2/?dfptest=50
With encodeURIComponent on Prebid and a decodeURIComponent on DFP Native Style :
http://www.precom-multimedia.com/interne/hpu/test_nativ2/index_custom.html?dfptest=40
Both pages are on Prebid debug mode
Expected results
Actual results
Without encode on prebid and decode from native style, I have blank hb_native_body / image
Platform details
PRebid 1.16-pre, Prebid 1.15
Chrome / Firefox (last versions)
Other information
The text was updated successfully, but these errors were encountered: