Package 'datoramar'

Title: Interface to the 'Datorama' Query & Platform API
Description: A thin wrapper around the 'Datorama' API. Ideal for analyzing marketing data from <https://datorama.com>.
Authors: Kade Killary [aut, cre]
Maintainer: Kade Killary <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2025-02-03 05:25:02 UTC
Source: https://github.com/kxzk/datoramar

Help Index


Process Data Streams

Description

Process all the data streams listed in 'dataStreamIds' between the dates 'startDate' and 'endDate' (format YYYY-MM-DD). The optional field 'create' determines whether it's the first time the data streams are being processed. Default value is false. Data streams being processed for the first time (i.e. create: true) will also have a SmartLenses dashboard created for them. This is designed to allow flexibility when creating complex setups via API. It is the API user's responsibility to determine if they want processed data streams to trigger SmartLenses creation.

Usage

datorama_process(access_token = NULL, dataStreamIds = NULL,
  startDate = NULL, endDate = NULL, create = FALSE)

Arguments

access_token

Authorization string that is found within the Datorama platform

dataStreamIds

A list of integers relationg to Data Stream IDs to process

startDate

A string -> format YYYY-MM-DD

endDate

A string -> format YYYY-MM-DD

create

A boolean indicating whether to create a new stream or not

Details

Note: Used for API streams only.

Value

A list containing the processing request's results

Examples

## Not run: 
datorama_process(acces_token = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                 dataStreamIds = list(348937, 34289),
                 startDate = "2018-01-01",
                 endDate = "2018-01-20",
)

## End(Not run)

A query constructor for the Datorama Query API

Description

Refer to Datorama's Developer portal for futher information. In order to use this package your account will have to have access to the Datorama Query API, which is a paid feature.

Usage

datorama_query(access_token = NULL, workspaceId = NULL, dateRange = NULL,
  startDate = NULL, endDate = NULL, measurements = NULL,
  dimensions = NULL, groupDimensionFilters = NULL,
  stringDimensionFilters = NULL, stringDimensionFiltersOperator = NULL,
  numberMeasurementFilter = NULL, sortBy = NULL, sortOrder = NULL,
  topResults = NULL, groupOthers = NULL, topPerDimension = NULL)

Arguments

access_token

Authorization string that is found within the Datorama platform

workspaceId

A string containing the workspaceId

dateRange

A string containing date range for query

startDate

A string -> format YYYY-MM-DD

endDate

A string -> format YYYY-MM-DD

measurements

A list of lists including attributes to include -> list(list(name = "Investment"))

dimensions

A list of dimensions to be included -> list("Day", "Site Name")

groupDimensionFilters

A list of lists including dimension, operator -> "IN", "NOT IN", and vals for filtering

stringDimensionFilters

A list of lists including dimension, operator -> "EQUALS", "NOT_EQUALS", "NOT_EQUALS_CASE_SENSITIVE", "CONTAINS", "NOT_CONTAINS", "STARTS_WITH", "ENDS_WITH", "IS_EMPTY", "IS_NOT_EMPTY", and val for filtering

stringDimensionFiltersOperator

A string for string dimension filtering -> "AND", "OR"

numberMeasurementFilter

A list of lists including filedName (measurement name), operator -> "EQUALS", "NOT_EQUALS", "GREATER", "GREATER_EQUALS", "LESS", "LESS_EQUALS", "IS_NULL", "IS_NOT_NULL", "IS_NAN", "IS_NOT_NAN" and val for filtering

sortBy

A string including name of dimension/measurement to sort by

sortOrder

A string containing the order of the sort -> "ASC", "DESC"

topResults

A string containing the number of results to return

groupOthers

Boolean determining whether to group all results not in topResults

topPerDimension

Boolean determining whether to return topResults per dimension

Value

A tibble with the query's response

Examples

## Not run: 
datorama_query(acces_token = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
               workspaceId = "271",
               dateRange = "CUSTOM",
               startDate = "2017-11-01",
               endDate = "2017-11-20",
               measurements = list(list(name = "Clicks"),
                              list(name = "Impressions")),
               dimensions = list("Day", "Site Name")
)

## End(Not run)