Customise Google Analytics Connector Template(s)

The advanced editor enables you to include non-standard data in your reports. Follow this short tutorial and unlock more growth for your business.
Note: It is advised to go through this walkthrough of the connector structure before reading this tutorial for better understanding of the customisation process.
You can follow and export almost every metric and dimension that Google provides using our connectors.
There are few rules to follow when adjusting Google Analytics templates:
  • Values in the query need to follow Google API documentation. You can find most of the supported values on this page.
  • ROIVENUE provides two kinds of Google Analytics Templates:
    • Campaigns Daily is for "performance" metrics like sessions, clicks, hits, etc.
    • Transaction Daily is for lists of transactions with metrics like transaction tax, etc.
It is advised to change transaction-related metrics in the Transaction template and Campaign-related metrics in the Campaigns daily template.

How to Adjust the Template

Adjusting the template isn't as hard as it sounds. It requires only three steps:

Step 1: Decide Which Metric or Dimension to Add

Browse the supported metrics and find the new column you would like to export. Let's say you want to download Time on Page (per user) from Google Analytics. The API call to download that metric is ga:timeOnPage. It is a performance metric, so it's best if you use the Campaign's Daily Template.
Finding the parameter in the Google API documentation

Step 2: Create the Parameter in the Connector Advanced Editor

Go to your connector and enable the Advanced Editor. Then find the metrics and dimensions section in the query.
Add ga:timeOnPage, to the metrics section.
Note: Don't forget to add a comma to separate it from the metric in the list before it.

Step 3: Define the Metric

The last step is to add the parameter Time on Page to the data set as a metric. It can't be called unless a definition is assigned to it. To do this, add the new metric to the "transform list".
Note: JSON and its parameters are case-sensitive.
The Code defines the name of the column
The Datatype is what type of data are you storing in the cells. Long is a value, that tells the JSON to store integers in it.
The ConceptType is saying if the field is metric or dimension.
The SemanticType tells you how and in which format should the field be threated.
The source parameter is referring to the source parameter from the second part of the query. The connector checks if the value in the source field refers to the same field from the second part and if yes, it populates the column with that data.
Note: You need to refer to the source parameter without the "ga:" prefix. Otherwise, the connector will fail.
After that, you are ready to save the adjustment and test it in the Preview section of your connector. The results in your Excel sheet from your newly customised template should look like this:
Note: If you are not sure what to do, contact your Roivenue Connector Support. We will be happy to help you.