Ampersand (&) being returned as \u0026 in JSON response for Native ad

1.121 weergaven
Naar het eerste ongelezen bericht

JM Chilgren

ongelezen,
26 jan 2018, 14:33:2026-01-2018
aan Google Mobile Ads SDK Developers
Hi - 

I have a URL string using key-value patterns that has an ampersand (&) separating the two patterns.

In the JSON native ad response, the ampersand is returned as: \u0026

Example:

clickUrl field in Creative: http://url.com/index.php?Artist_Name=%%PATTERN:an%%&Track_Name=%%PATTERN:tt%%

Returned in the pubads response as:
"name": "clickUrl",
"type": "string",
"string_value": "http://url.com/index.php?Artist_Name=Camila Cabello Feat. Young Thug\u0026Track_Name=Havana"

I don't normally see this in other string URL responses when using &, so wonder if it's an issue with it being placed between two pattern values? (Using this macro in a standard ad unit works properly; only not working when being returned in the JSON of the native ad). 

Tested using Google SDK (afma-sdk-i-v7.26.0) and iOS 11.2.2

Thanks!

mobileadssdk-a...@google.com

ongelezen,
26 jan 2018, 16:01:2426-01-2018
aan JM Chilgren, Google Mobile Ads SDK Developers
Hi there,

Thanks for reaching out to us. Can you please capture Charles log of your Ad Request and share it with us to debug on our end? It looks like a creative specific issue.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/cd26717b-c8b6-4048-a7f5-c6e92b5d965a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mobileadssdk-a...@google.com

ongelezen,
29 jan 2018, 11:34:5029-01-2018
aan JM Chilgren, Google Mobile Ads SDK Developers
Hi there,

Thank you for the sending the Charles logs. We have shared this with the team and will update you when I have more information.

Regards,
Deepika Uragyaala
Mobile Ads SDK Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

mobileadssdk-a...@google.com

ongelezen,
29 jan 2018, 17:16:4529-01-2018
aan JM Chilgren, Google Mobile Ads SDK Developers
Hey,

I performed a quick test where I made an ad request to the same ad placement used in your Charles log (/6925/TEST_Shazam_AndroidAPP/TEST_Regression_320x50/TEST_Tag_Result_Leaderboard) and even though the JSON ad response encodes the ampersand as "\u0026", calling stringForKey:@"clickUrl" on the custom native ad returned the following string as expected:


Is this not the behavior you're experiencing?

- Ram 

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 01/29/18 08:34:30 mobileadssdk-a...@google.com wrote:
Hi there,

Thank you for the sending the Charles logs. We have shared this with the team and will update you when I have more information.

Regards,
Deepika Uragyaala
Mobile Ads SDK Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

JM Chilgren

ongelezen,
1 feb 2018, 14:56:5601-02-2018
aan mobileadssdk-a...@google.com, Google Mobile Ads SDK Developers
On iOS, the ad appears to not be clickable (i.e. clicking on it does not open the URL) - however, we are re-checking the implementation to be sure (since it’s a native ad). It works properly on Android. I’ll post back here if we aren’t able to solve this. Thanks!
Bericht is verwijderd

JM

ongelezen,
5 feb 2018, 12:58:4405-02-2018
aan Google Mobile Ads SDK Developers
After further testing, we are finding the URL is still coming back with the Ampersand encoded, and becomes unclickable in the clickURL string - to get the same result we see, you would need to rewrite the ad unit (/6925/TEST_Shazam_iPhoneAPP/TEST_Regression_320x50/TEST_Tag_Result_Leaderboard) and then visit any of the Shazam track pages (Shazam any song) for the key-values in the pattern to be populated - those key-values are only on our track pages; we think this might be where it's breaking. We are going to look at encoding this string on our end, but it does seem like it could be a bug to us - other URLs come back properly (when not using a pattern), and it doesn't not happen on our Android implementation, or when using a standard ad unit like a banner. Could you let us know if that might be the case?

Thanks!
JM

On Thursday, 1 February 2018 14:56:56 UTC-5, JM Chilgren wrote:
On iOS, the ad appears to not be clickable (i.e. clicking on it does not open the URL) - however, we are re-checking the implementation to be sure (since it’s a native ad). It works properly on Android. I’ll post back here if we aren’t able to solve this. Thanks!


On Jan 29, 2018, at 5:16 PM, mobileadssdk-advisor+support@google.com wrote:

Hey,

I performed a quick test where I made an ad request to the same ad placement used in your Charles log (/6925/TEST_Shazam_AndroidAPP/TEST_Regression_320x50/TEST_Tag_Result_Leaderboard) and even though the JSON ad response encodes the ampersand as "\u0026", calling stringForKey:@"clickUrl" on the custom native ad returned the following string as expected:


Is this not the behavior you're experiencing?

- Ram 

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

JM

ongelezen,
6 feb 2018, 11:52:0706-02-2018
aan Google Mobile Ads SDK Developers
Hi there,

After a bit of digging, we think we found the issue.

This is the URL we input, with PATTERN macros, in the clickUrl field (which is set in the native template as a "Standard URL"):  http://setasrbt.com/index.php?Artist_Name=%%PATTERN:an%%&Track_Name=%%PATTERN:tt%%&mcc_mnc=%%PATTERN:mcc_mnc%%

In this example, an=Camila Cabello Feat. Young Thug tt=Havana

However, this is returned unescaped in the ad response as: 
{
"name": "clickUrl",
"type": "string",
"string_value": "http://setasrbt.com/index.php?Artist_Name=Camila Cabello Feat. Young Thug\u0026Track_Name=Havana"
}],

Because the values returned have spaces in it, iOS cannot open the URL properly. This does work fine on Android.

We think that because this is defined in the Native Template as a "Standard URL" - that any values passed in by the macros should become encoded (as they do for the Click-through URL field).

I've tried using URI_ENCODE in the field as well, but these also come back in the ad response without the key-values inserted on iOS (however...this does work on Android): 

{
"name": "clickUrl",
"type": "string",

For reference, the creative is setup here: orderId=2236170178&lineItemId=4566261966&creativeId=138224118060
And the template is: creativeTemplateId=11739084

Are there any solutions to this that you can think of, that would enable the key-values to be inserted in the URL string escaped properly?

Thanks!

JM Chilgren

ongelezen,
7 feb 2018, 10:04:2007-02-2018
aan mobileads-...@google.com, Google Mobile Ads SDK Developers
We can’t change the key-values as far as what is being passed into DFP at this point - we pass them in with spaces in the strings, and have had no other issues with that structure, except for this specific clickUrl field (which is setup as a “URL” field in the Native DFP template, not a generic text string). Unless there is a way to escape the key-value pattern values in the DFP Native creative fields with a macro - but I have not figured out a way to do that. (URI_ENCODE does not seem to work). Perhaps this is more of a DFP issue? 

Thanks,
JM


On Feb 6, 2018, at 7:54 PM, mobileads-...@google.com wrote:

Hey JM,

Could you not double escape the pattern values before including them in the ad request? ie. "Camila%2520Cabello%2520Feat.%2520Young%2520Thug" for "Camila Cabello Feat. Young Thug".

- Ram


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 02/06/18 08:52:07 jm.ch...@shazam.com wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.

To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

JM Chilgren

ongelezen,
9 feb 2018, 12:05:4209-02-2018
aan mobileads-...@google.com, Google Mobile Ads SDK Developers
Awesome. Thank you!

On 8 February 2018 at 19:05, <mobileads-...@google.com> wrote:
I've reached out to the DFP serving team about the URI_ENCODE macro not working as expected and will follow up as soon as I have more information for you.

- Ram


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

JM


To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscr...@googlegroups.com.




--
JM Chilgren
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten