Segment

Segment is the single platform that collects, translates, and routes your user data to hundreds of analytics & marketing tools with the flip of a switch. By integrating Segment with Cooladata you can track events using the Segment APIs from any source and save them to your Cooladata project, in addition to or instead of using Cooladata’s SDKs or APIs.

Segment integration with Cooladata works via Amazon Kinesis. Integrating Segment with Cooladata allows you to stream event data via Amazon Kinesis in addition to, or instead of using Cooladata’s SDKs or APIs.

 

 

Settings up a Segment integration

  1. Set up an Amazon Kinesis integration, as explained here.
  2. In your Segment account, set up a new Amazon Kinesis source. You will need the following details:
    1. AWS User access KEY ID
    2. AWS Kinesis Stream Regio: use “us-east-1”
    3. AWS user secret  access KEY
    4. AWS Stream kinesis name
  3. Click “Activate integration”

For more information on Segment’s integration with Amazon Kinesis see Segment’s documentation.

 

APIs

Cooladata supports the following Segment APIs:

  • Identify
  • Track
  • Page
  • Screen

For more information on the various Segment APIs see Segment’s documentation.

 

Event structure

Segment events are slightly different from Cooladata events. Segment events use nested JSON, and have different property names than Cooladata. When integration Segment and Cooladata, Cooladata flattens these event Segment property names are mapped to Cooladata properties.

JSON Flattening:

When a Segment event contains a nested JSON, it will be flattened using the standard JSON format. For example:

{a:{b:”value”}}

 will be converted to

{a.b:"value"}

Thus, the property name of this key will be “a.b”.

 

Property Mapping

Segment property names are mapped to Cooladata properties according to the following table. Where more than one Segment property can apply, the priority matches the order in the table.

Segment PropertyCooladata Property
user_idproperties_UserId
user_id
userId
anonymous_id
anonymousId
user_alternative_idanonymous_id
anonymousId
event_nameevent
type
event_server_time_tstimestamp
received_at
receivedAt
event_client_time_tssent_at
sentAt
session_ipcontext_ip
session_ip_countrycontext_locale
session_app_idcontext_app_name
session_brandcontext_device_name
session_modelcontext_device_model
session_os_versioncontext_os_version
session_oscontext_os_name
tracker_typecontext_library_name
tracker_versioncontext_library_version
utm_campaigncontext_campaign_name
utm_contentcontext_campaign_content
utm_mediumcontext_campaign_medium
utm_sourcecontext_campaign_source
utm_termcontext_campaign_term
session_duacontext_userAgent
Print Friendly, PDF & Email

Firebase

Firebase is Google’s mobile platform that helps you quickly develop high-quality apps and grow your business.

You can now integrate Firebase with Cooladata so that all the events generated by Analytics for Firebase will be sent as any other event to your Cooladata project.

To do so, you will need to link your Firebase app to BigQuery. Linking your Firebase app to BigQuery allows you to access your raw, unsampled event data along with all of your parameters and user properties.

Once you’ve linked your Firebase app to a BigQuery project, we will connect it to your Cooladata project. This will stream all your event data directly into your Cooladata project, where you can query, export or join your data with data from other platforms and data sources in your project, to perform custom analysis.

To set up a new Firebase integration, contact your Customer Success Manager or email us at support@cooladata.com.

Print Friendly, PDF & Email

Amazon Kinesis

Amazon Kinesis is a cloud-based service for real-time data streaming, able to process thousands of data streams per-second. It has some similarities in functionality to Apache Kafka.

Amazon Kinesis makes it easy to collect, process, and analyze real-time, streaming data so you can get timely insights and react quickly to new information. Integrating Amazon Kinesis allows you to stream event data in real time via Amazon Kinesis, in addition to or instead of using Cooladata’s SDKs or APIs.

If you already use Amazon Kinesis, you can use your existing service to integrate with Cooladata. If not, we can create one for you.

Using your own Amazon Kinesis account

  1. Contact your CSM or email us at support@cooladata.com to set up a new integration.
  2. Provide your CSM with the following details:
    • IAM User Access Key ID
    • IAM User AWS Secret Access Key
    • AWS Kinesis Stream Name
  3. Your CSM will provide you with the Cooladata service account details. In your AWS account, allow Cooladata read permissions on your Kinesis server.

Once done, all events sent to the Kinesis server defined will also be tracked by Cooladata, the same way as any event sent from the SDKs.

 

Setting up a new Amazon Kinesis account

  1. Contact your CSM or email us at support@cooladata.com to set up a new integration.
  2. We will create a new Kinesis server account for you and provide you with all the access information to it.

Once done, all events sent to the Kinesis server defined will also be tracked by Cooladata, the same way as any event sent from the SDKs.

Print Friendly, PDF & Email

Google Cloud Storage

Setup

CoolaData provides an integration option that enables you to upload the content of any CSV or JSON file from a Google Cloud Storage bucket into your CoolaData project. This type of integration is typically used to enrich your CoolaData events with your own data.

CoolaData creates a dedicated bucket for you in Google Cloud Storage and then automatically uploads the file name and file type that you specify every hour.

To upload content into CoolaData from a Google Cloud Storage Bucket:

  1. Contact your CoolaData customer success representative or write to support@CoolaData.com. Ask them to create a Google Cloud Storage bucket for you into which you can dump your CSV and JSON files to be integrated into CoolaData.
  2. Upload your files into this Google Cloud Storage bucket. For example, by using the UPLOAD FILES button in the Google Cloud Platform user interface. You could also use the gsutil tool in order to automate this process. See the following link for some useful commands: https://cloud.google.com/storage/docs/gsutil
    7-14
  3. Follow the instructions in Integrating with Predefined Data Sources and then select Google Cloud Storage:
    7-16
  4. Fill in the following:
    • Integration Name – The name of this integration.
    • Load data only once – Check this option to specify that CoolaData only loads the data from your CoolaData bucket once. Otherwise, data is loaded every hour, if available.
    • Upload Data Format – Select CSV or JSON to specify the format of the files to be uploaded from your CoolaData bucket. JSON files must be flat (not nested) newline – delimited.
    • File Name – The file name to be uploaded. Make sure to add the file type ending, such as csv/json.
    • Use File Name as Table Name – Check this box to specify that the name of the table that is created in CoolaData is the same as the File Name (described above). This is the table name to be used in the queries that you will perform on the uploaded data. If you choose this option, then make sure that the file name is a valid table name.
    • Table Name – If you did not select the option above, then enter the name of the table to be created in CoolaData to contain the data that is uploaded. Like all table names, it is case sensitive and cannot include spaces or special characters.
    • Append Date to the Table Name – Appends the date when the table is created to the table name. A new table partition is created for each date. Its format is TableName_YYYYMMDD. Selecting this feature enables you to use Google’s BigQuery Data Partitioning feature. You may contact your CoolaData’s customer success representative to hear more about this feature.
    • File Scheme – Define the scheme of the columns of the table to be uploaded by defining the name and data type of each column. Click the Add + button to add each new column. The following data types are supported – string, integer, float, Boolean and timestamp. For example, name:STRING, id:INTEGER, birthdate:TIMESTAMP.
    • In the Insert Strategy field, select either –
      • Append New data is added to the table each time data is uploaded.
        – OR –
      • Replace The table is overwritten each time the data is uploaded.
    • In the Emails to Notify If the Failure field, type in the emails to whom to send integration upload and failure notifications.
    • [Optional] You can use the Google Project ID and Google Dataset fields to define that CoolaData uploads data from your CoolaData bucket into your own Google project instead of into your CoolaData project. Contact your CoolaData customer success representative for more information.
  5. Click the Save button.

Each hour CoolaData will then integrate the files that are dropped into this bucket into your project. The first integration process should take place within a few minutes.
After CoolaData has integrated the files into your CoolaData project, the CoolaData Google bucket is emptied. The files are moved to a subfolder named Uploaded in the bucket and a timestamp is appended to the beginning of the file name. The syntax is – YYYYMMDD_filname.filetype. For example, 20160823_stats.csv.

The Status column of the Integrations list changes to show Data Received.
If the integration process fails for any reason, then the file is moved to a subfolder in the bucket named Failed. An email is sent to the specified recipient(s) (described above) alerting them regarding the integration failure. The same filename convention would be applied in the Failed folder as well.

Data can now be queried using the following syntax:

SELECT * 
FROM tableName

 

Date Format

Define the Date Format to recognize and convert timestamps columns so they can be used as such in Cooladata. All JAVA standard time formats are supported. The following characters can be used – 1-3 chars represents the abbreviated form, if one exists; 4+ chars represents the full form. The date syntax is case sensitive, so (for example) MM represents month and mm represents seconds.

Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -800

Examples:

Date Format
04-18-17 MM-dd-yy
18-04-2017 dd-MM-yyyy
18/04/2017 19:36:55 dd/MM/yyyy HH:mm:ss
18/04/2017 07:36:55 dd/MM/yyyy hh:mm aa
Tue 04/18/2017 EEE MM/dd/yyyy
Print Friendly, PDF & Email

Gmail

Setup

CoolaData enables you to upload data contained in file attachments (CSV, JSON or Excel files) received by a Gmail account into your CoolaData project. This type of integration is typically used to enrich your CoolaData project with your own data or to upload reports you receive regularly for querying alongside your behavioral data.

Each hour, CoolaData searches the subject of incoming emails (of the Gmail account that you specify) in order to search for a specific string in the email’s subject and then uploads their content into your CoolaData project. CoolaData learns the schema of these file attachments by understanding the values of each property.

Note: Only Gmail is supported. You can use any Gmail account: business/private/freemium.

  1. Follow the instructions in Integrating with Predefined Data Sources and then select Email Report .
    The following displays:
    7-18
  2. Fill in the following:
    • Integration Name: The name of this integration.
    • Date Format: Fill in this field if the file attachments to be uploaded contain date fields. Specify the format of the date fields: as they are in the file. CoolaData can then automatically convert these date fields to timestamp format. Only one format can be defined. For example, the format of the date 18/04/2016 16:21:16 should be entered here as: dd/MM/yyyy HH:mm:ss.
    • Report File Delimiter: Select Comma or Tab to specify the delimiter between each data row and column in the email attachment.
    • Email Subject: Enter a string that specifies which emails are to be integrated by CoolaData. This can be any string, including a complete or partial name. All incoming emails that contain this string in their subject are checked for an attached CSV, JSON or Excel file. The data the attached file of matching emails is then integrated into CoolaData. We recommend making this string as unique as possible, in order to avoid CoolaData attempting to integrate irrelevant emails. If needed you can define more than one integration for the same Gmail address/inbox: each containing a different subject: and each being stored in a different table.
    • Table Name: The name of the table that is created in CoolaData to contain the data that is uploaded. This is the table name to be used in the queries that you will perform on the uploaded data. Like all table names, it is case sensitive and cannot include spaces or special characters.
    • In the Insert Strategy field, select either:
      Append: New data is added to the table each time data is uploaded.
      OR
      Replace: The table is overwritten each time the data is uploaded.
      Note: If the Insert Strategy field is set to Append, then the schema of each file attachment must be identical. Otherwise, the integration fails.
    • Add Date Column to Table: Select this option to specify that a date column is added to each table that is created by CoolaData when a new email attachment is uploaded. This date specifies the timestamp when the integration took place. This option is particularly useful when the uploaded reports do not include dates. This option is also helpful when you use the Insert Strategy: Append (described above), because it indicates when each row was added to the table.
    • [Optional] You can use the Google Project ID and Google Dataset fields to define that CoolaData uploads the email attachments into your own Google project instead of into your CoolaData project. Contact your CoolaData customer success representative for more information.
  3. Click the Connect button. The following displays:
    7-18
  4. Enter the Gmail account credentials of the email inbox to be monitored by CoolaData. If you are already logged into your Gmail account in a different window on the same computer, then there is no need to enter your Gmail account credentials. Click the Allow button.
    Each hour CoolaData will search for an email with the specified project and if found, it will then integrate the relevant email attachments into your project. The first integration process should take place within a few minutes.
    After CoolaData has integrated the files in your project, the email is labeled in Gmail as Uploaded.
    7-20
    The Status column of the Integrations list changes to show Data Fetched.
    If the integration process fails for any reason, then the email is labeled in Gmail as Failed. An email is sent to the specified recipient(s) (described above) alerting them regarding the integration failure.
  5. Data can now be queried using the following syntax.
    SELECT * from tablename limit 100

 

Date Format

Define the Date Format to recognize and convert timestamps columns so they can be used as such in Cooladata. All JAVA standard time formats are supported. The following characters can be used – 1-3 chars represents the abbreviated form, if one exists; 4+ chars represents the full form. The date syntax is case sensitive, so (for example) MM represents month and mm represents seconds.

Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -800

 

Examples:

Date Format
04-18-17 MM-dd-yy
18-04-2017 dd-MM-yyyy
18/04/2017 19:36:55 dd/MM/yyyy HH:mm:ss
18/04/2017 07:36:55 dd/MM/yyyy hh:mm aa
Tue 04/18/2017 EEE MM/dd/yyyy
Print Friendly, PDF & Email