Variabili di conversione personalizzate
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Le variabili di conversione personalizzate
ti consentono di associare informazioni aggiuntive, sotto forma di tag, a una conversione
che importi utilizzando l'API Google Ads, ad esempio le conversioni da clic o da chiamata. Con queste
informazioni, puoi creare report segmentati che forniscono dati più completi sulle
conversioni.
Ad esempio, quando importi una conversione per l'acquisto di un nuovo cappello blu,
potresti importare anche due tag associati: color
e status
con i valori
blue
e new
, rispettivamente. Procedi nel seguente modo:
Crea tutte le variabili di conversione personalizzate che ti servono. Ogni variabile
corrisponde a un tag. Pertanto, se vuoi due tag (color
e
status
), devi creare due variabili personalizzate. I campi obbligatori per
ConversionCustomVariable
sono i
seguenti:
name
: identifica la variabile. Il nome deve essere univoco.
tag
: per il nostro esempio,
i tag sono color
e status
. I tag vengono utilizzati nello snippet
evento
quando una conversione viene inviata a Google Ads dal tuo sito web. Se utilizzi l'API Google Ads, devi specificare il nome della risorsa delle variabili personalizzate durante l'importazione delle conversioni, come descritto nel passaggio successivo.
Quando importi una conversione, ad esempio
ClickConversion
, imposta
custom_variables
sull'elenco di tutte le variabili personalizzate che hai creato nel passaggio precedente. Devi impostare tutti i campi di ogni variabile personalizzata:
conversion_custom_variable
:
Il nome della risorsa della variabile personalizzata creata nel passaggio
precedente.
value
: il valore del tag che vuoi associare alla conversione. Per il nostro
esempio: blue
e new
.
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-26 UTC.
[null,null,["Ultimo aggiornamento 2025-08-26 UTC."],[[["\u003cp\u003eCustom conversion variables allow associating additional information, like tags, to conversions uploaded via the Google Ads API.\u003c/p\u003e\n"],["\u003cp\u003eTo use custom variables, first create them, defining a unique name and tag for each desired piece of information.\u003c/p\u003e\n"],["\u003cp\u003eWhen uploading a conversion, include the custom variables, specifying their resource name and the corresponding value for the tag.\u003c/p\u003e\n"],["\u003cp\u003eThis process lets you add details like 'color' or 'status' to conversions, enabling richer data analysis and reporting.\u003c/p\u003e\n"]]],[],null,["# Custom Conversion Variables\n\n[Custom conversion variables](//support.google.com/google-ads/answer/9964350)\nlet you associate additional information, in the form of tags, to a conversion\nthat you import using the Google Ads API, such as click or call conversions. With this\ninformation, you can create segmented reports that provide richer data about\nyour conversions.\n\nFor example, when importing a conversion for the purchase of a new blue hat,\nyou could also import two associated tags: `color` and `status` with the values\n`blue` and `new`, respectively. Here are the steps:\n\n1. Create as many custom conversion variables as you need. Each variable\n corresponds to one tag. Therefore, if you want two tags (`color` and\n `status`), you need to create two custom variables. The required fields for\n [`ConversionCustomVariable`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable) are as\n follows:\n\n | **Note:** See [`ConversionCustomVariable`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable) for limitations on its fields.\n - [`name`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable#name): Identifies the variable. The name must be unique.\n - [`tag`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable#tag): For our example, the tags are `color` and `status`. Tags are used in the [event\n snippet](//support.google.com/google-ads/answer/9962082#Add&zippy=%2Cconversion-tracking-using-tags-on-your-website) when a conversion is sent to Google Ads by your website. If you use the Google Ads API, you would need to specify the resource name of the custom variables when importing conversions, as detailed in the next step.\n2. When importing a conversion, such as\n [`ClickConversion`](/google-ads/api/reference/rpc/v21/ClickConversion), set\n [`custom_variables`](/google-ads/api/reference/rpc/v21/ClickConversion#custom_variables%5B%5D) to\n the list of all custom variables you created in the previous step. You need\n to set all the fields of each custom variable:\n\n - [`conversion_custom_variable`](/google-ads/api/reference/rpc/v21/CustomVariable#conversion_custom_variable): The resource name of the custom variable you created in the previous step.\n - [`value`](/google-ads/api/reference/rpc/v21/CustomVariable#conversion_custom_variable): The value for the tag you want to associate with the conversion. For our example: `blue` and `new`."]]