# Custom Data
Quick Set
- CREATE: Data File.
- CHOOSE: "Process": arrow_right: "Add new process": arrow_right: "Custom Data"
- CHOOSE: How to import the file.
- INCLUDE the configured module in the Workflow schedule and start them.
: tada: READY give yourself a high-five **: tada: **
# Introduction
External data can contain any information about products or transactions, such as, for example, order status, returns, complaints, product margin, and even a link to a photo, etc. This allows you to include this data in reports, linking it with, for example, the correct date and value orders.
# An example of operation
- You have data on order statuses in a file in the CRM system.
- You combine returns data with Google Analytics data and cost data.
- You determine the actual cost of advertising activities in each traffic source, taking into account the actual profit after subtracting the value of returns.
# Configuration
# Before you start
Before connecting the data, it is necessary to prepare:
- module Collect,
- input data file.
The module supports external data provided in:
of the csv file. or txt.,
google spreadsheet,
url linking to the file,
table in BigQuery.
File size restrictions
Data import from ** csv file. or txt. supports maximum size up to 10MB. In the case of larger files it is necessary to use another option - put the file on Google Storage and use the option of attaching the file from **URL or as a table in BigQuery.**
Think about the level of information you want to add.
Data can be entered into the database on one of the three levels:
- session
This level includes, for example, UserId that is single information assigned to the entire session - hit
This level contains information generated by each user interaction with the site. In the case of e-commerce, this level includes information related to the transaction. - product
This level contains information about a specific product e.g. extended attributes such as supplier, margin on the product, size, photo, etc.
Remember!
The selection of the appropriate level is important due to the logical value of the entered data for the business model.
# Start creating the module
From the menu on the left, select the Process tab, then click the Add new Data Process button.
From the list of available modules, select Analytics Data Import
# Initial settings
In the first step, we have 2 settings to choose from.
Process name Enter the name of our process here, it will be visible under this name in other places on the WitCloud platform.
Based on we choose from the list a previously configured process to which our data is to be attached.
# Data import from file
We start by completing the options for three dialog boxes.
In the Scope option, select the level to which you want to attach the data. The most general level is the session level, the most specific is the product level.
In the Data Source option, select the data source that we want to include - in this case "_ file / file". _
In the window File Url select the path to the data file.
After making the settings, click the Create button.
After the file is mounted, it is necessary to select a data link key. In point Join keys, select the column from the attached file and indicate which column in the session table these data correspond to.
In the next step, select the remaining fields of the imported file Fields mapping and assign them the fields to which they are to correspond in the session table.
When importing user data, we can assign parameters not originally included in Google Analytics tables. In this case, WitCloud prepares the fields in the crmMetric and crmDimension columns. The user has a choice of 200 columns.
Is crmMetric or crmDimensions?
crmMetric fields should be selected for numerical data (float), crmDimensions fields are appropriate for text descriptions (string).
# Data import from URL
We start by completing the options for three dialog boxes.
In the Scope option, select the level to which you want to add data. The most general level is the session level, the most specific is the product level.
In the Data Source option, select the data source that we want to include - in this case "URL".
Enter the file address in the File Url window.
File location
The data file must be on the server or in a google storage service. Files placed in google drive cannot be supported.
After making the settings, click the _ Fetch. _ Button
After the file is mounted, it is necessary to select a data link key. In point Join keys select the column from the attached file and indicate which column in the session table these data correspond to.
In the next step, select the remaining fields of the imported file Fields mapping and assign them the fields to which they are to correspond in the session table
When importing user data, we can assign parameters not originally included in Google Analytics tables. In this case, WitCloud prepares the fields in the crmMetric and crmDimension columns. The user has a choice of 200 columns.
Is crmMetric or crmDimensions?
crmMetric fields should be selected for numerical data (float), crmDimensions fields are appropriate for ** text descriptions (string)**.
# Data import from spreadsheet
We start by completing the options for three dialog boxes.
In the Scope option, select the level to which you want to attach the data. The most general level is the session level, the most specific is the product level.
In the Data Source option, select the data source that we want to include - in this case "Spreadsheet".
In the Authorize with google window, select the user who has access to the Spreadsheet file with data.
After selecting the account, you can choose the file (Spreadsheet Id) and the sheet in the file (Sheet Name).
Spreadsheet Id can be easily downloaded from the document address field. In a web browser, after enabling a given file, it is a string of characters as in the photo below.
Sheet Name is the sheet name to be rewritten or pasted from the sheet.
After the file is mounted, it is necessary to select a data link key. In point Join keys, select the column from the attached file and indicate which column in the session table these data correspond to.
In the next step, select the remaining fields of the imported file Fields mapping and assign them the fields to which they will correspond in the session table.
When importing user data, we can assign parameters not originally included in Google Analytics tables. In this case, WitCloud prepares the fields in the crmMetric and crmDimension columns. The user has a choice of 200 columns.
Is crmMetric or crmDimensions?
crmMetric fields should be selected for numerical data (float), crmDimensions fields are appropriate for text descriptions (string).
# Data import from BigQuery
We start by completing the options for three dialog boxes.
In the Scope option, select the level to which you want to attach the data. The most general level is the session level, the most specific is the product level.
In the Data Source option, select the data source that we want to include - in this case "_ BigQuery". _
In the field Google Cloud Project, select the correct project with the data to be imported. The BigQuery Dataset and BigQuery Table fields show the resources to which we have access and which can be selected as a data source. These are datasets and tables made available at the IAM level in Google Cloud Platform.
What if there is no access to the entire GCP project?
If there is no access to a project at the IAM level, you can add data from this project in the following steps:
- providing the correct dataset in BigQuery to the user (specifying the Dedicated Service Account),
- selecting the Custom projectId option from the selection box (3),
- entering or pasting the name of the project, in which the shared dataset is located, then it will appear in the field options (4) and (5) that can be selected.
Then with the Fetch button we connect the selected table.
After the file is mounted, it is necessary to select a data link key. In point Join keys, select the column from the attached file and indicate which column in the session table these data correspond to.
In the next step, we select the remaining fields of the imported file Fields mapping and assign them the fields to which they are to correspond in the session table.
When importing user data, we can assign parameters not originally included in Google Analytics tables. In this case, WitCloud prepares the fields in the crmMetric and crmDimension columns. The user has a choice of 200 columns.
Is crmMetric or crmDimensions?
crmMetric fields should be selected for numerical data (float), crmDimensions fields are appropriate for text descriptions (string).
# Setting the module in the schedule
Remember about the schedule !!
Please note that the configured data import process must be included in the Workflow configuration for it to be recalculated.