Custom Floodlight variables enable you to capture information beyond the basics (visits and revenue) that you can collect with standard parameters in your tags.
Custom variables use the (case sensitive) keys
u2, and so on, and can take any values that you choose to pass to them. You can include custom Floodlight variables in any of your Floodlight activity tags and report on their values in Report Builder. You can create up to 100 custom variables per Floodlight configuration. You can also add friendly names to make these parameters easier to understand in reports.
Example use cases
There are lots of creative ways that you can use custom variables:
Location: Pass the area code, the shipping or billing postal code, the region, etc.
Travel and vacation: Pass the number of nights booked for hotels, participation in a rewards program, route or fare details for travel, etc.
Products: Pass the SKU, product name, sales tax amount, shipping amount, etc.
Loyalty: Pass an indicator that shows whether the user is a new or a returning customer.
There is no character limit for custom variables, but remember that the length of your variables adds to the total length of the URL in the user's browser. This is important because total URL length is limited in some browsers. For example, Internet Explorer has a maximum URL length of 2,048 characters. If your custom variable is very long, it may make the URL too long.
Create custom variables
To create or edit a custom variable:
Find the advertiser you want to work with and go to the Floodlight configuration tab, then click Custom Floodlight variables.
For each custom variable you want to create or edit, enter a Friendly Name, which is the name for the variable that is used in reports. For example, if you are using a custom variable to include users' ZIP codes in the Floodlight tags, you could use ZIP Code as the Friendly Name.
Choose the Type of custom variable you're creating. Choose string if you want the variable to include alphanumeric characters or special characters. Choose number if you want to pass numeric values. There are a few considerations for variable values:
- There is no character limit for custom variables, but remember that the length of your variables adds to the total length of the URL in the user's browser. This is important because total URL length is limited in some browsers. For example, Internet Explorer has a maximum URL length of 2,048 characters. If your custom variable is very long, it may make the URL too long.
- String variables do not accept the following characters:
> or #.
- Number variables use a decimal point (.) as a separator, such as 3.5.
- Special characters need to be URL encoded to avoid processing issues.
Please take care when using parameters in tags. The terms of your Google Marketing Platform contract prohibit passing any information to us that we could use or recognize as personally identifiable information (PII). If you enter certain values into a field in a Google Marketing Platform product, you may see a warning that reminds you that you must not use parameters to pass data that we would recognize as PII. Parameter friendly names that trigger this warning include, for example,
username. Note that it is okay to use these friendly names if your purpose is not to collect information that Google Marketing Platform could use or recognize as PII. (For example, a custom variable with the friendly name
weekly is fine, but passing a user’s email address is not.) If we see any cause for concern, we may contact you to confirm that you are not using parameters in a way that is prohibited.
Learn more about our best practices to avoid sending PII.