Customizing Google Analytics and AdWords Tables

Applicable to Sisense on Linux and Microsoft Windows

Introduction

Sisense provides a connector to easily access data from both Google Analytics and AdWords. By default, certain tables and fields are imported from these sources. A detailed description of these standard tables and fields can be found below.

In addition, you can add customized tables and additional fields. For more details, read the section below on customization.

Standard Tables from Google Analytics

Below is a list of ready-made reports you can easily access using the Sisense Google Analytics provider.

Standard Tables from Google AdWords

Below is a list of ready-made reports you can easily access using the Sisense Google AdWords provider.

Adding and Customizing Tables and Fields in Google Analytics and AdWords

You can customize both the tables and the fields that you imported from Google Analytics and AdWords. Using the procedure below, you can also import fields from tables that are not automatically imported by Sisense.

To customize the imported data:

  1. Find the appropriate dimension from the Google API: Google Analytics API / Google AdWords API.
  2. Note: Use the dimension name and not the XML attribute.
  3. Open the GAnalytics.Fields and GAnalytics.Tables XML files for Google Analytics, or the AdWords.Fields and AdWords.Tables XML files for Google AdWords.
    Windows:
    Note: Starting from Sisense version 8.2.2, these files can be found in the following locations after the first successful connection to the datasource is established.
  4. A restart is not required after the files update.
    Linux:
    Note: These files can be found in the following locations after the first successful connection to the datasource is established.
    A restart is not required after the files update.
  1. To add a new field from a different table, open the “GAnalytics.Tables.xml” file or “AdWords.Tables.xml” file, and add a new table element that includes the new field.

    Note: Do not add the field to an existing table element.

    In the following example, AccountTimeZoneId is a field from a table that is not imported by default.

    <table name="Time Zone Table Example" report_type="Query" aggregation_type="Monthly">

    <fields>

    <field id="AccountTimeZoneId"></field>

    </fields>

    </table>

    </tables>

  2. Add the same field to the relevant GAnalytics.Fields or AdWords.Fields xml file, as follows:

Note: Do not add the field to an existing table element.

In the following example, AccountTimeZoneId is a field from a table that is not imported by default.

<table name="Time Zone Table Example" report_type="Query" aggregation_type="Monthly">

<fields>

<field id="AccountTimeZoneId"></field>

</fields>

</table>

</tables>

Once you save these changes and connect to Google Analytics, you will see the AccountTimeZoneId field in the ‘Time Zone Table’ example.

Notes

Adding Custom Dimensions and Values to Google Analytics Tables

To import custom dimensions and values, they must be first defined in the ‘Fields’ XML, and later included in the relevant reports in the ‘Tables’ XML.

Open the fields XML from: %ProgramData%\Sisense\DataConnectors\JVMContainer\Sisense\PrismServer\LocalRepository2.0\Resources\Google\Analytics

Windows:

Linux:

Google Analytics:
/opt/sisense/storage/connectors/googleanalytics

Google Ads:
/opt/sisense/storage/connectors/googleads

Custom Dimension:

<field id=”ga:dimension1” name=”FIELD_NAME” response_value=”ga:dimension1” type="System.String" class="dimension"></field>

Custom Metric:

<field id=”ga:customVarValue1” name=”VALUE_NAME” response_value=”ga:customVarValue1” type="System.String" class="metric"></field>

The serial number of the dimension/value must be the same as defined in Google Analytics. The rest of the custom field attributes must be defined according to type; you can use a similar field for reference.

After adding the field, save the XML and add the field to the relevant report in the tables XML.

For more troubleshooting, see this forum post.