Skip to content
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

change setPageTargeting method to setTargeting #33

Open
httnn opened this issue Aug 28, 2015 · 1 comment
Open

change setPageTargeting method to setTargeting #33

httnn opened this issue Aug 28, 2015 · 1 comment

Comments

@httnn
Copy link

httnn commented Aug 28, 2015

setPageTargeting is a bit misleading. this could be documented also!

@httnn httnn changed the title change setPageTargeting method to setTargeting change setPageTargeting method to setTargeting Aug 28, 2015
@jsoprano
Copy link
Contributor

We have to be able to differentiate Slot-level customized targeting (we have a PR created that will add this functionality) from Page-level customized targeting, here is an explanation for each one from Google:

* Slot-level customized targeting: You can set custom targeting attributes for individual ad slots on your page. Use .setTargeting to utilize slot-level targeting, as in the Google Publisher Tag samples.

Typically, we recommend using slot-level implementation for customized targeting, as it covers all targeting scenarios (both when the custom targeting is the same throughout the page, and when it varies by individual slots).

* Page-level customized targeting: You can use this to set custom attributes across all ad slots on your page. Use googletag.pubads().setTargeting to utilize page-level targeting, as in the Google Publisher Tag samples.

Page-level targeting allows clients to use less code in their tags and ensures that all ad slots have the same set of custom targeting attributes. For example, clients could set the key-value pair gender=m on all ad slots using page-level customized targeting.

Source: https://support.google.com/dfp_premium/answer/1697712?hl=en

I found that solution but please you are welcome to submit a PR that will implement it in a way that we always call it setTargeting and depending on another parameter we will know if its slot level or page level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants