Custom Dimensions
Gamera supports the concept of custom dimensions
. A custom dimension is meta data that you would like to associate with a particular visit. For example, you might have some first party data about the food preferences of a current visitor that you would like to track in Gamera analytics (Visitor likes pizza).
Standard Dimensions
Before you add a custom dimension it is important to know that Gamera tracks the following standard dimensions automatically for visitors. You do not need to pass a custom dimension for any of the following types of dimensions:
Dimension | Description |
---|---|
user_language | The language set in the user's browser. |
user_tz | The time zone of the user. |
referrer_type | The type of source that referred the user to the site. |
referrer_domain | The domain of the site that referred the user. |
page | The specific web page viewed by the user. |
viewport_size | The size of the user's viewport (browser window). |
device_type | The type of device used (e.g., desktop, mobile, tablet). |
os | The operating system of the user's device. |
os_version | The version of the operating system. |
browser | The web browser used by the user. |
browser_version | The version of the web browser. |
geo_country | The country from where the user is accessing the site. |
geo_region | The region within the country from where the user is accessing. |
geo_city | The city from where the user is accessing the site. |
geo_zip | The ZIP or postal code of the user’s location. |
geo_dma | The Designated Market Area of the user's location. |
utm_campaign | The campaign name from UTM parameters |
utm_term | The campaign term from UTM parameters |
utm_source | The campaign source from UTM parameters |
utm_content | The campaign content from UTM parameters |
utm_medium | The campaign medium from UTM parameters |
Tracking Custom Dimensions
If you would like to attach additional dimensions to your visitors not tracked by our standard dimensions you must complete the following two steps:
- Adding the custom dimension to the list of allowed dimensions in the Gamera Site Manager and;
- Passing the custom dimension from your site by adding some additional javascript to your page.
Adding Custom Dimension to Allowed Dimensions
Gamera will reject all dimensions that are not added by you or your team members to the list of allowed dimensions in the Gamera Site Manager. Please note, each site has its own inclusion list. You can add an approved custom dimension by following these simple steps
- In the Gamera Portal click on
Site Manager
- From the Site Manager click on the
Actions Menu
of the site you wish to add the dimension to - Select
Edit Custom Dimensions
from the site Actions Menu
- From the
Custom Dimensions
page, selectNew Dimension
- Enter the name of your custom dimensions
- Click
Ok
to add the custom dimension
Passing in Custom Dimensions from your Site
In order to consume your new custom dimension, you must pass the dimension along with its value from your site to Gamera using our on page library.
IMPORTANT:
Please note that this code should be placed immediately before or after the Gamera javascript library tag. Placing the code too far down in your site's head or body may result in the dimensions not being sent for every user session
window.gamera = window.gamera || {};
window.gamera.cmd = window.gamera.cmd || [];
window.gamera.cmd.push(function() {
window.gamera.addDimensions({
// List your custom dimensions as
// key value pairs here
"favorite_food": "pizza",
// If your dimension contains
// multiple values, separate
// them with commas
"multi-value-dimension": "value1,value2,value3",
// If your dimension contains
// a single value, pass it as
// a string
"single-value-dimension": "this-is-a-test-value"
});
});
Custom Dimension Limitations
The following limits are applied to custom dimensions:
- You can have at most 50 custom dimensions (keys)
- There is a 100 character limit per key-value pair (the name and value of the custom dimension combined).
- Multi dimension values are treated as multiple custom dimensions. For example
animal=bird,dog
are treated as two custom dimensions, each having their own 100 character limit.