Custom variable reports allow you to track events using your own reporting labels even after you've begun the reporting process.
Use custom report variables when:
- You need to track more than 400 interactive elements in your creative.
- You need to track dynamically generated counters (for example, information entered by a user at runtime, data collected from input text fields, or variables that are determined at runtime).
- Maximum 100 characters
- Latin characters only (no Chinese, Cyrillic, etc.)
- If the string includes question marks, semicolons, or number signs, both the symbol and anything after it will be truncated. Examples:
- http://www.example.com/profile?12345 is reported as http://www.example.com/profile
- http://www.example.com/profile;12345 is reported as http://www.example.com/profile
- http://www.example.com/profile#12345 is reported as http://www.example.com/profile
- No personally identifiable data, such as name, email address, phone number, health info, financial info, and so on.
Step 1: Add custom report variables in HTML5
This sends the reporting string "Click Tracked" to Google Marketing Platform's servers. When you run a custom variable report, there will be 2 counts against this string: Custom Variable Count 1 and Custom Variable Count 2. In this case, the string should identify what content in the creative resulted in the user's performing an action for readable reporting later.
reportCustomVariableCount2 don't behave in the same way as an
Enabler.exit function. These counts only appear in custom variable reporting. Make sure to also use a standard
Enabler.exit function to generate a new window for clicks that should open an advertiser landing page.
The two counts can be used to track different types of events against a particular string. For example, the
reportCustomVariableCount1 method can be called for each impression against a given string, and the
reportCustomVariableCount2 method can be called for each click against a given string. By doing this, both impressions and clicks can be tracked against the reporting labels you chose.