Custom variables add richer data to your conversions so that you can further segment your reports. Learn more about custom variables for conversions
This article will explain how to set up your custom variables, access your custom variables report, and troubleshoot set up issues. Custom variables are available for:
Set up your custom variables
To set up custom variables, select one of the following setup instructions:
Conversion tracking using tags on your website
To set up custom variables in conversion tracking tags on your website, you’ll need to:
- Create your custom variable (optional).
- Add variables to your Google tag event snippet.
- Activate your custom variables in Google Ads.
Before you begin
If you haven’t set up your conversion tracking tag, follow the steps to set up conversion tracking for your website.
After you've set up your conversion tracking tag, you’ll need to update your conversion tracking tag to include your custom variables.
Instructions
1. Create your custom variable (optional)
You can add a new custom variable within Google Ads before implementing the new variable in the conversion tag on your page. This isn't required if you're adding the variable to the conversion tag on your webpage, as it will automatically display on the custom variables page for you to activate (described in future steps).
To create your custom variable:
- In your Google Ads account, click the Goals icon .
- Click the Conversions drop down in the section menu.
- Click Custom variable.
- Click the plus button .
- Under “Custom variables”, enter a name to describe the custom variable. This name will be used in your Ads reporting.
- Specify the “Tag string”. This may have a default value based on the variable name you specified. Whatever you specify as the Tag string will need to match what you name the variable in your conversion tag.
- For example, if the Tag string is set as ‘color’, your tag must pass the variable as ‘color’ (view the global tag event snippet example below).
- Click Save. Proceed to the next step, which includes adding the variable to the conversion tag (event snippet) on your page.
2. Add variable to your Google tag event snippet
If you're using the Google tag and a corresponding event snippet, you can add custom variables to the event snippet tag like so, where there are 3 example variables included (example_variable, color, product_name):
gtag('event', ‘conversion’, {'send_to':
'TAG_ID/AW-CONVERSION_LABEL',
'example_variable': 'example_string',
'color': 'example_blue',
'product_name': 'example_name'
});
Each of the variables you pass into the conversion event snippet will be included as a row in the custom variables page and will be available for you to report on in Google Ads.
3. Activate your custom variable
Check your custom variables page to find if any conversion actions need to be activated.
To activate your custom variable:
- In your Google Ads account, click the Goals icon .
- Click the Conversions drop down in the section menu.
- Click Custom variable. Look for the custom variables that have the status “Activation needed”.
- Under the “Actions column” for those custom variables, click Activate. Your custom variable will now show as “Enabled” in the “Status column”.
To activate your custom variables in bulk (for cases where you have a lot):
- In your Google Ads account, click the Goals icon .
- Click the Conversions drop down in the section menu.
- Click Custom variable. Look for the custom variables that have the status “Activation needed”.
- Select the checkbox beside each custom variable you want to activate.
- Click Edit at the top of the page, and select Enable. All your selected custom variables will now show as “Enabled”.
Offline conversion imports
To set up custom variables in offline conversion imports you’ll need to:
Instructions
1. Create and activate your custom variables
- In your Google Ads account, click the Goals icon .
- Click the Conversions drop down in the section menu.
- Click Custom variable.
- Under “New custom variables”, enter the name of the new custom variable. The tag string will automatically be created.
- Click Save. The new custom variable will be added to the table. Your custom variable will now show as “Enabled” in the “Status column”.
2. Add additional columns to your CSV or spreadsheet for offline conversions
You can add additional optional columns in your offline conversion CSV or spreadsheet that represent your custom variables. Custom variables columns must already be defined and activated for them to be successfully uploaded.
Make sure you include the required fields like GCLID, conversion name, conversion value, and conversion currency.
You can also, enter the custom variable name “cv:[custom_variable_tag_string]” under “Column name” in the following format:
- cv: Prefix indicating this column represents a custom variable
- [tag string of custom variable]: Tag string of activated custom variable
Note: The custom variable names must be formatted in lowercase.
Examples of column name:
“cv:property_type”, or
“cv:customer_program”, or
“cv:product_category”
3. Upload the offline conversion file (CSV or spreadsheet) manually or automatically
Refer to import conversions from ad clicks into Google Ads. Adjusting custom variables after upload is currently not supported.
Keep in mind:
- Custom variables must be activated before adding a column with the custom variable.
- Variable names and values must not include PII or you might receive a warning.
- Variable names must be written in lowercase.
Access your custom variables reporting
Overview of your custom variables on a custom variable page
After you’ve set up your custom variable, you’ll be able to view the following columns on the custom variable page:
- Custom variable: The name you’ve given your custom variable. You’ll be able to edit this if you want to.
- Tag string: The name of your custom variable in the source code.
- Status: Your custom variable will show as either "Enabled", "Paused", or "Activation Needed". At any time, you can change the status of your custom variables:
- Enabled: The custom variable data is being recorded and it can be used for reporting.
- Paused: The custom variable data is no longer being recorded, and you can't report on this variable at this time. If you re-enable the variable, only the data recorded before the variable was paused and after it was enabled will be visible in reports (there may be a data gap).
- Activation needed: The customer variable data from your tag is being received, but it's not being recorded for reporting “activate” that particular variable, enabling that variable for reporting. Note that this doesn't apply to custom variables uploaded through offline conversion import.
- Remove: This is an option if you’d like to remove the custom variable and historical data from your reporting. The custom variable will no longer show on the custom variables page.
- Recent values: The last 5 custom variable values you received from this custom variable.
- Received time: Shows the time your conversion variable was received.
- Actions: Click "Activate" to enable your conversion variable.
Create a custom column using custom variables
- In your Google Ads account, click the Campaigns icon .
- Click the Campaigns drop down in the section menu.
- Click Campaigns.
- In the upper right corner of the table, click the columns icon .
- Click + Custom column.
- Enter a name that will be used as the column header.
- Enter a description of the column that you’ll view when you hover over the column header.
- Click + Column, then select Conversions.
- In the “Segment” section that appears on the right, click Custom variable.
- Select from the list of custom variable values.
- When you’ve finished entering column information, click Apply. You’ll be taken back to the “Modify columns” page.
- Select your new custom column, then click Apply to view it in the table.
Just like standard Google Ads columns, custom columns can be filtered, sorted, downloaded, and used to customize your performance summary chart above your statistics table. Learn how to customize your tables and charts
View your custom variables with segments in your table
- In your Google Ads account, click the Campaigns icon .
- Click the Campaigns drop down in the section menu.
- Click Campaigns.
- In the upper right corner of the table, click the columns icon , then click the segment icon .
- Select “Conversions”, then select “Custom variable”. You can then select the variables you want to add.
- After you’ve selected your custom variables, they'll show up in your campaign report.
Note: Only core conversion metrics (“Conversions”, “All conv.”, “Cross-device conv.”, “View-through conversions”, and so on) will be segmentable by custom variables. Ratio metrics like “conv. rate” or “Cost/conv.” can't be segmented by custom variables.
Only enabled variables are available for reporting purposes. Also, any conversions that don’t have the particular custom variable (for example, historical data that were accrued before the variable was active), will be skipped in segment rows for this dimension and only shown in unsegmented rows.
Troubleshoot your custom conversion variables
Duplicate variables
The same event has duplicated tag variables, such as: car-color=red and car-color=blue. To avoid duplication, check your tag strings to remove any instances where there are multiple values for the same custom variable. Each conversion event snippet should only contain one unique value for each custom variable. For offline conversion uploads, subsequent uploads of the same conversion with custom variables of the same type will overwrite the previous custom variable (for example, uploading a conversion with car-color=red and then car-color=blue will overwrite the car-color=red variable to be blue). If you want to assign multiple values of the same custom variable to a conversion event, consider making more than one custom variable to accommodate this.
Values exceed limit or values are approaching limit
Values beyond the first 100,000 for any custom variable aren't recorded. You may have received a warning in Google Ads that you're approaching this limit, or you may have viewed a message in your custom variables page informing you that more than 100,000 values have been sent with your custom variable key. Check your conversion tag (or offline upload) if you think this number was reached in error. If more than 100,000 values are needed, you should consider creating new custom variables.
If you received this message in an MCC account, make sure to check the child accounts contain ing the custom variables that are approaching or exceeding this limit.
Private data found
Your custom variables data contain unreported private customer data, such as email addresses or phone numbers. To ensure you aren’t sending private customer data with custom variables, change your implementation to remove those variables.
Custom variables should be used to add richer data about your conversions for reporting but shouldn't be used to attribute additional information about converting users. Learn more about data collection and its use
Strings too long
Strings are limited to 100 characters for custom variable data. Make sure your custom variable tag strings (or offline import custom variable column length) contain 100 characters or fewer.