AMP-ad: is there a way to format values in a real-time-config URL?
I'm working on passing along consent values to both an amp-ad component and an amp-analytics. With amp-analytics, I'm able to do some formatting of values before I include them as query string parameters in a URL. Specifically, I'm looking to send the consent metadata gdprApplies boolean as a 0 or 1. The way I'm doing that is something like:
gdpr=$IF($EQUALS(CONSENT_METADATA(gdprApplies), true), 1)$IF($EQUALS(CONSENT_METADATA(gdprApplies), false), 0)
In the amp-ad component, I'd like to do the same thing. Is it possible? I have a vendor config object in real-time-config/callout-vendors.js , and I'd like to add something equivalent to what I have above for the amp-analytics component.
Thanks!
Hello,
The callout vendor URL allows a smaller set of macros than elsewhere (analytics). Could you elaborate what is the motivation? Most of these logics can be processed on the server side. Do you have some limitations there?
Hello,
The callout vendor URL allows a smaller set of macros than elsewhere (analytics). Could you elaborate what is the motivation? Most of these logics can be processed on the server side. Do you have some limitations there?
That's what I'm seeing in my investigation. Is there any documentation for what macros are available in either context? I tried, but couldn't find anything; I resorted to digging through the code to come up with the example I posted.
As for why - yes, I can make changes to handle these values server-side, but that doesn't mean I want to. It's not just an effort thing - we are consuming TCF consent data from other sources already, and it's already represented as a "boolean" 0 or 1. That's not something we invented, that's per the IAB documentation: https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#inapptcdata Having to look for and convert other values is just less clean, one more thing we'll have to account for in testing, and inconsistent. It's not a big deal, but if there were any way to make that conversion at the request, it would be preferable.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Asking because StaleBot reminded me - any movement on this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.