Migliorare le campagne pubblicitarie con i PPS
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Puoi inviare dati contestuali e sui segmenti di pubblico come
indicatori forniti dal publisher
(PPS) nelle richieste di annuncio. Con i PPS, puoi utilizzare i dati utente per migliorare la monetizzazione programmatica comunicando le caratteristiche del tuo segmento di pubblico agli offerenti in tutti i tipi di transazioni, utilizzando tassonomie standard, senza dover condividere identificatori utente. Le caratteristiche del pubblico possono includere dati comportamentali e basati sugli interessi (Tassonomia del pubblico IAB 1.1) e dati contestuali (Tassonomia dei contenuti IAB 2.2).
Puoi anche inviare indicatori strutturati forniti dal publisher, definiti da Google, e consentire l'invio di indicatori aggiuntivi.
Crea il file JSON degli indicatori utente
A livello superiore, crea un oggetto JSON con una singola coppia chiave-valore. La chiave deve essere PublisherProvidedTaxonomySignals
e il relativo valore deve essere un array di oggetti. Ogni oggetto nell'array deve avere due coppie chiave-valore:
La chiave taxonomy
, che accetta i seguenti valori mappati alle seguenti specifiche pubbliche IAB:
IAB_AUDIENCE_1_1
per la Tassonomia del pubblico 1.1
IAB_CONTENT_2_2
per la tassonomia dei contenuti 2.2
La chiave values
con un array corrispondente di valori di tassonomia delle stringhe.
Crea l'array di indicatori strutturati
Per gli indicatori strutturati, aggiungi la chiave PublisherProvidedStructuredSignals
con un valore di un array di oggetti. Costruisci l'oggetto in base al seguente elenco
di coppie chiave-valore dell'indicatore:
Attiva/disattiva la visualizzazione della tabella degli indicatori strutturati
Indicatore |
<code" dir="ltr" translate="no">"type" Valore</code"> |
Valori possibili di "single_value" |
Valori possibili di "values" |
Tipo di feed audio |
"audio_feed" |
"af_1" : Musica
"af_2" : trasmissione
"af_3" : podcast
|
n/a |
Classificazione contenuti |
"content_rating" |
"cr_1" : G
"cr_2" : PG
"cr_3" : T
"cr_4" : MA
|
n/a |
Importazione dei contenuti |
"delivery" |
n/a |
"cd_1" : streaming
"cd_2" : progressiva
"cd_3" : download
|
Qualità di produzione |
"prodq" |
"pq_1" : Produzione professionale
"pq_2" : prosumer
"pq_3" : Contenuti generati dagli utenti
|
n/a |
Consulta l'esempio seguente che utilizza IAB_AUDIENCE_1_1
e IAB_CONTENT_2_2
per gli indicatori della tassonomia e include indicatori strutturati.
const userSignals = {
"PublisherProvidedTaxonomySignals": [{
"taxonomy": "IAB_AUDIENCE_1_1",
"values": ["6", "284"]
// '6' = 'Demographic | Age Range | 30-34'
// '284' = 'Interest | Business and Finance | Mergers and Acquisitions'
},
{
"taxonomy": "IAB_CONTENT_2_2",
"values": ["49", "138"]
// '49' = 'Books and Literature | Poetry'
// '138' = 'Education | College Education | College Planning'
}],
"PublisherProvidedStructuredSignals": [{
"type": "audio_feed",
"single_value": "af_1",
},
{
"type": "delivery",
"values": ["cd_1", "cd_3"],
},
],
};
Per inviare i PPS con il tuo
AdsRequest
:
- Crea una stringa JSON con gli interessi, il comportamento o i dati contestuali dell'utente.
- Crea una stringa ASCII con codifica Base64 dalla stringa JSON sopra.
- Aggiungi la stringa codificata all'URL del tag annuncio con il parametro
&ppsj=
.
JSONObject userSignalsObject = new JSONObject();
JSONArray userSignalsArray = new JSONArray();
JSONObject audienceTaxonomyObject = new JSONObject();
JSONArray valuesArray = new JSONArray();
valuesArray.put("1");
valuesArray.put("284");
try {
audienceTaxonomyObject.put("taxonomy", "IAB_AUDIENCE_1_1");
audienceTaxonomyObject.put("values", valuesArray);
} catch (JSONException e) {
e.printStackTrace();
}
userSignalsArray.put(audienceTaxonomyObject);
try {
userSignalsObject.put("PublisherProvidedTaxonomySignals", userSignalsArray);
} catch (JSONException e) {
e.printStackTrace();
}
String userSignals = userSignalsObject.toString();
byte[] userSignalsByte=new byte[0];
try {
userSignalsByte = userSignals.getBytes(StandardCharsets.UTF_8);
String encodedBas64Signals = android.util.Base64.encodeToString(
userSignalsByte,
android.util.Base64.URL_SAFE);
encodedSignals = URLEncoder.encode(encodedBas64Signals, "UTF-8");
} catch (java.io.UnsupportedEncodingException error) {
Log.w("Sample app", error);
}
String finalAdTag = sampleAdTag + "&ppsj=" + encodedSignals;
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-31 UTC.
[null,null,["Ultimo aggiornamento 2025-08-31 UTC."],[[["\u003cp\u003ePublisher provided signals (PPS) let you share audience and contextual data with bidders to enhance programmatic ad monetization using standardized taxonomies, without exposing user identifiers.\u003c/p\u003e\n"],["\u003cp\u003ePPS utilizes IAB taxonomies like Audience Taxonomy 1.1 and Content Taxonomy 2.2 to categorize user characteristics, such as interests and behaviors, and content details, for improved ad targeting.\u003c/p\u003e\n"],["\u003cp\u003eYou can structure this data as a JSON object, containing taxonomy signals and optional structured signals with predefined keys like audio feed type or content rating.\u003c/p\u003e\n"],["\u003cp\u003eTo send PPS, create a JSON string with user data, Base64-encode it, and append it to your ad tag URL using the \u003ccode\u003e&ppsj=\u003c/code\u003e parameter.\u003c/p\u003e\n"]]],[],null,["# Improve ad campaigns with PPS\n\nYou can send audience and contextual data as\n[publisher provided signals](//support.google.com/admanager/answer/12451124)\n(PPS) in ad requests. With PPS, you can use your user data to improve\nprogrammatic monetization by communicating your audience characteristics to\nbidders in all\n[transaction types](//support.google.com/admanager/answer/2805834), using\nstandard taxonomies, without the need to share user identifiers. Your audience\ncharacteristics can include behavioral and interest-based data (\n[IAB Audience Taxonomy 1.1](//iabtechlab.com/standards/audience-taxonomy/)), and\ncontextual data (\n[IAB Content Taxonomy 2.2](https://iabtechlab.com/standards/content-taxonomy/)).\nYou can also send publisher provided structured signals, which are defined by\nGoogle, and allow for additional signals to be sent.\n\nConstruct the user signals JSON\n-------------------------------\n\nAt the top level, create a JSON object with a single key-value pair. The key\nshould be `PublisherProvidedTaxonomySignals`, and its value should be an array\nof objects. Each object in the array should have 2 key-value pairs:\n\n- The `taxonomy` key, which accepts the following values that are mapped to\n following IAB public specifications:\n\n - `IAB_AUDIENCE_1_1` for Audience Taxonomy 1.1\n - `IAB_CONTENT_2_2` for Content Taxonomy 2.2\n- The `values` key with a corresponding array of string taxonomy values.\n\n### Construct the structured signals array\n\nFor structured signals, add the `PublisherProvidedStructuredSignals` key with a\nvalue of an array of objects. Construct the object based on the following list\nof signal key-values: \n\n#### Toggle view of structured signals table\n\n| Signal | \"type\" Value | Possible `\"single_value\"` Values | Possible `\"values\"` Values |\n|--------------------|--------------------|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------|\n| Audio Feed Type | `\"audio_feed\"` | - `\"af_1\"`: Music - `\"af_2\"`: Broadcast - `\"af_3\"`: Podcast | n/a |\n| Content Rating | `\"content_rating\"` | - `\"cr_1\"`: G - `\"cr_2\"`: PG - `\"cr_3\"`: T - `\"cr_4\"`: MA | n/a |\n| Content Delivery | `\"delivery\"` | n/a | - `\"cd_1\"`: Streaming - `\"cd_2\"`: Progressive - `\"cd_3\"`: Download |\n| Production Quality | `\"prodq\"` | - `\"pq_1\"`: Professionally Produced - `\"pq_2\"`: Prosumer - `\"pq_3\"`: User Generated (UGC) | n/a |\n\nSee the following example that uses the `IAB_AUDIENCE_1_1` and `IAB_CONTENT_2_2`\nfor taxonomy signals and includes structured signals. \n\n const userSignals = {\n \"PublisherProvidedTaxonomySignals\": [{\n \"taxonomy\": \"IAB_AUDIENCE_1_1\",\n \"values\": [\"6\", \"284\"]\n // '6' = 'Demographic | Age Range | 30-34'\n // '284' = 'Interest | Business and Finance | Mergers and Acquisitions'\n },\n {\n \"taxonomy\": \"IAB_CONTENT_2_2\",\n \"values\": [\"49\", \"138\"]\n // '49' = 'Books and Literature | Poetry'\n // '138' = 'Education | College Education | College Planning'\n }],\n \"PublisherProvidedStructuredSignals\": [{\n \"type\": \"audio_feed\",\n \"single_value\": \"af_1\",\n },\n {\n \"type\": \"delivery\",\n \"values\": [\"cd_1\", \"cd_3\"],\n },\n ],\n };\n\nConfigure your ad request\n-------------------------\n\nFollow these steps to send PPS with your\n[`AdsRequest`](/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/AdsRequest):\n\n- Create a JSON string with the user's interest, behavior, or contextual data.\n- Create a Base64-encoded ASCII string from the JSON string above.\n- Append the encoded string to your ad tag URL with the `&ppsj=` parameter.\n\n JSONObject userSignalsObject = new JSONObject();\n JSONArray userSignalsArray = new JSONArray();\n JSONObject audienceTaxonomyObject = new JSONObject();\n JSONArray valuesArray = new JSONArray();\n valuesArray.put(\"1\");\n valuesArray.put(\"284\");\n try {\n audienceTaxonomyObject.put(\"taxonomy\", \"IAB_AUDIENCE_1_1\");\n audienceTaxonomyObject.put(\"values\", valuesArray);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n userSignalsArray.put(audienceTaxonomyObject);\n\n try {\n userSignalsObject.put(\"PublisherProvidedTaxonomySignals\", userSignalsArray);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n String userSignals = userSignalsObject.toString();\n\n byte[] userSignalsByte=new byte[0];\n try {\n userSignalsByte = userSignals.getBytes(StandardCharsets.UTF_8);\n String encodedBas64Signals = android.util.Base64.encodeToString(\n userSignalsByte,\n android.util.Base64.URL_SAFE);\n encodedSignals = URLEncoder.encode(encodedBas64Signals, \"UTF-8\");\n } catch (java.io.UnsupportedEncodingException error) {\n Log.w(\"Sample app\", error);\n }\n\n String finalAdTag = sampleAdTag + \"&ppsj=\" + encodedSignals;"]]