Amphtml: Amp-ad: include client_id macro into amp-ad

Created on 22 Oct 2019  路  30Comments  路  Source: ampproject/amphtml

We would like to have client_id accessible inside our amp-ads through client_id macro,
the same as we do it with amp-analytics component: (https://github.com/ampproject/amphtml/blob/master/spec/amp-var-substitutions.md#client-id).

Currently it is implemented for amp-list, but not for amp-ad. We tried to include amp-ads inside amp-list, but it's not working.

In the end we would like to get something like this, so that client-id will be assessable in amp-ads even when they are served via Google CDN:

image

By client_id we mean not PPID that is used in DFP, but the userId that we set as a cookie by amp-analytics script

Feature Request monetization

Most helpful comment

Hi @massa1240 you should be able to test using our nightly now if you wish. This should hit 100% of prod 9/1 barring any release weirdness.

All 30 comments

Another note from my side - this is not about doubleclick or any adnetwork specific features, just about enabling the client_id macro besides amp-analytics and links also for amp-ad, which doesn't seem to work right now.

Doubleclick extension already sends CLIENT_ID(AMP_ECID_GOOGLE) in the ad request.

https://github.com/ampproject/amphtml/blob/3b5035c5ab38ee550170308b33932187f64c1d13/ads/google/a4a/utils.js#L276-L279

Do you mean that you want to access all CLIENT_ID?

/cc @keithwrightbos

For other ad networks integrated using a cross-origin iframe, clientId is available through the context API: https://github.com/ampproject/amphtml/blob/master/ads/README.md#available-information-to-the-ad

Amazing info, thanks a lot! This will help with a couple usecases (e.g. might make the Taboola case we discussed offline at least easier), but it will not help with cases where a publisher wants to push their own user ids into an ad network - for this the website owner would need to be able to use their own scope for the client_id instead of the one of the ad network.

@martinschierle that makes sense. Probably AMP can provide full macro expansion here.

the json attribute is a doubleclick only feature, @keithwrightbos for input from doubleclick's point of view. Do publishers pass along cookie values in ad requests on non-AMP pages?

Is there any update here? We have a couple monetization usecases which seem impacted by this?

We discussed offline a bit more. It seems if our AMP RTC mechanism is used, it will expand clientID macros there, so that it can populate back into ad manager key-values. More docs here:

https://github.com/ampproject/amphtml/blob/master/extensions/amp-ad-network-doubleclick-impl/doubleclick-rtc.md

@gembarguk I think this should solve your usecase?

@martinschierle Thank you, we are already using RTC, but I didn't find clientID among available macros there...

Hi, @martinschierle That would also solve a similar use-case I am having trouble with. Could you confirm that CLIENTID macro will be added in any time soon? I tried this week using it and it doesn't work - also it isn't listed in the RTC documentation. What we have there is the ADCID, which doesn't really solve my particular issue.

Hi folks,

We have received another request for this feature to be available. It's not uncommon for publishers to pass these kind of values to ad-servers, is there anything we can do to re-prioritize this request?

In the meantime, having some workaround could be of help.

Thanks.

cc // @kbarneyforbes @martinschierle

Have there been any updates with this? We have been trying to use client_id in amp-ad for targeting.

@jeffjose to chime in.

We have discussed with the Doubleclick team are now planning on implementing this feature as soon as time permits.

is the plan to expand variables within the doubleclick jsonattribute? OR it will be applied to all data- attributes?

The idea was just to do the json attribute, do you think it would be better to change the scope?

I don't have a preference. asked because the requirement was not clear to me. Thanks for the clarification.

We are expecting to use it in the json attribute. Something like

<amp-ad height="251" width="321" type="doubleclick" data-block-on-consent data-slot="/7175/fdcmobile/article-amp/topline/default/standard" data-multi-size="321x251,300x250,320x50,300x50,1x1,300x251" data-multi-size-validation="false" rtc-config="{&quot;vendors&quot;: {&quot;medianet&quot;: {&quot;CID&quot;: &quot;8CU66O230&quot;}, &quot;aps&quot;: {&quot;PUB_ID&quot;: &quot;3038&quot;, &quot;PARAMS&quot;: {&quot;amp&quot;: &quot;1&quot;}}}}" json="{&quot;targeting&quot;:{&quot;amp&quot;:&quot;true&quot;,&quot;author&quot;:&quot;sarahhansen&quot;,&quot;channel&quot;:&quot;money&quot;,&quot;section&quot;:&quot;money:markets&quot;,&quot;type&quot;:&quot;forbesstaff&quot;,&quot;es&quot;:&quot;stocks,coronaVirus&quot;,&quot;badges&quot;:&quot;breaking-news&quot;,&quot;mobilex&quot;:&quot;0&quot;,&quot;fvid&quot;:&quot;${clientId}&quot;,&quot;pos&quot;:&quot;mobilerec&quot;,&quot;templatetype&quot;:&quot;topline&quot;,&quot;swimlane&quot;:&quot;&quot;,&quot;specialslot&quot;:&quot;&quot;,&quot;id&quot;:&quot;blogAndPostId/blog/post/5866-5ebd88effa7dab0006fe6109&quot;,&quot;brand&quot;:&quot;&quot;,&quot;strnativekey&quot;:&quot;13b84c32&quot;}}"></amp-ad>

@kbarneyforbes I just noticed your example has the CID in rtc-config. My plan was to expand this macro in the json attributes targeting. Does this satisfy your use case?

Edit: never mind, I see it in targeting as well :)

Leaving this issue open until experiment is fully launched.

awesome, @calebcordry ! Has it been deployed? Do we have a documentation written for it? Thanks a lot!

Any updates on when this will be fully deployed?

Sorry for the delay all. We had some problems with our experiment config (fixed in #29113) and the fix just his prod Tuesday 7/21. We are now ramping up but unfortunately will be a couple more weeks.

Hi, @calebcordry. Does this latest merge #29832 mean that this is already in prod or is still being tested? Just left a meeting and this issue was mentioned, I just wanna know if we can start experimenting with this new config on our amp pages or it's still not ready. Thank you for looking at this!

Hi @massa1240 you should be able to test using our nightly now if you wish. This should hit 100% of prod 9/1 barring any release weirdness.

Hi @calebcordry , could you please tell if it's already on Production? Couldn't find it out...

I just saw this and was hoping it meant all var substitutions would work now for the json attribute like: QUERY_PARAM, EXTERNAL_REFERRER, $DEFAULT, $REPLACE, etc.
which would be nice for passing utm_* params, referral domain, etc, in json targeting for reporting purposes.
but sadly it looks like merely CLIENT_ID was whitelisted as a valid var substitution 馃槥

Hi @andyblackwell I just tested inserting CLIENT_ID within amp-ad and it's not populating. You mentioned whitelisting, do you know when it will actually be available?

(the purpose is to insert CLIENT_ID within the "rtc-config" element, not "json". Is this in the roadmap?)

@dmanek to take a look

Hi all, we are now also allowing CLIENT_ID to be used in RTC callouts as of #31949. I believe this addresses all concerns in this thread. Please reopen if I missed something.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

choumx picture choumx  路  3Comments

edhollinghurst picture edhollinghurst  路  3Comments

mkhatib picture mkhatib  路  3Comments

torch2424 picture torch2424  路  3Comments

gmajoulet picture gmajoulet  路  3Comments