Extend the list of metrics and dimensions available in Smart Data with the new definitions.
Website data definitions are custom metrics and dimensions you are collecting from your website to Google Analytics and then to Google BigQuery. You can use only the definitions present in the website data table connected to the current Smart Data source set.
You can use only the definitions present in the website data table connected to the current Smart Data source set.
Read also: Calculated metrics and dimensions
How to add a custom definition from website data
- Go to Smart Data and make sure the data source set you want to add a new definition to is active.
- Click on the active source set, then click Manage custom definitions:
Alternatively, you can click Custom definitions in the metric/dimension menu on a report screen:
- You’ll get to the custom definitions management page for the active data source set. The source set’s name is displayed at the top of the page.
- Select the Website data definitions tab, then click Add definition and follow the setup process:
- Enter the Custom definition name. This name will be used to display the custom definition in the Smart Data metrics and dimensions list:You can add a Description to inform other users of your OWOX BI project what’s the purpose of this custom definition.
- Select the Definition type it should get in Smart Data — either a metric or a dimension. We recommend selecting the same type this custom definition has in Google Analytics.
- If you add a metric, you need to specify the Aggregation type for it (for example, sum or median). You can also add the Measurement unit for the metric in case you need it.
- Select the definition Scope — either hit-level, session-level, or product-level. Here, we also recommend selecting the same scope as in Google Analytics.
- Enter the digital index this definition has in a BigQuery table / Google Analytics settings. In a BigQuery table, you can find the index in the
customMetrics.indexfield for metrics and in the
customDimensions.indexfield for dimensions.
- Click Save. The new custom definition will be saved and available in the current Smart Data source set.
The definition will appear in the Custom definitions group in the metrics/dimensions menu and you'll be able to use it to create or edit a report in Smart Data.
You can see the list of all your custom definitions and edit them in the corresponding tab on the Manage custom definitions page.
After adding a new definition, Smart Data generates a Unique name to use in calculations. You need to use this name in code if you want to use this custom definition to calculate another definition. This unique name is displayed in the custom definition’s settings: