README.md

marketeR releaseLicense

marketer_logo

A Web Analytics Toolbox for Digital Marketers

The marketeR package provides a web analytics toolbox for digital marketers using Google Analytics.

Main features:

With marketeR, navigate the ocean of web data with the speed of a swordfish :fish: !

Table of contents

Installation

Open a new R session, and run the following code:

install_github("naileakim/marketeR")
library("marketeR")

Note: If you get the error Error: could not find function "install_github", you might need to install / load the package devtools first:

install.packages("devtools")
library("devtools")

Authentification

Getting your Google Analytics API credentials

The marketeR package is using the Google Analytics Reporting API V4 to get the data you need, and require you to be authentified with an access token. To start using marketeR, please follow the instructions below:

Accessing the Google Analytics API from R

Open a new R session, and run the following code with your credentials:

client.id <- "PASTE HERE YOUR CLIENT ID"
client.secret <- "PASTE HERE YOUR CLIENT SECRET"

Create your token object, then validate it:

token <- Auth(client.id, client.secret)
ValidateToken(token)

You can also save your token for future sessions:

save(token, file="./token_file")

So that in future sessions, you don't need to create a new token, you can just load it:

load("./token_file")
ValidateToken(token)

Documentation

Automatic reports

Description

The report function returns a report presenting your website KPIs during the last month, and their evolution over a one year period.

Usage

report(website)

Arguments

Example

report(website = "ga:XXXXXXX")

report

Note

The output file will be generated in your working directory. Don't know where is your working directory ? Type getwd() in the R console.

Week KPIs assessment

Description

The weekperf function returns a plot designed to assess your website KPIs during the past 7 days.

Usage

weekperf(kpi, website, export)

Arguments

Example

weekperf(kpi = "ga:sessions", website = "ga:XXXXXXX", export = TRUE)

weekperf

Note

The triangles are representing the results of the past 7 days. Their color may vary according to the mean (green is > mean, red is < mean). The mean is represented by the letter m.

KPIs forecasts

Description

The forecast function makes forecasts for your website KPIs for the next 3 months, using time-series.

Usage

forecast(kpi, website, export)

Arguments

Example

forecast(kpi = "ga:sessions", website = "ga:XXXXXXX", export = FALSE)

forecast

Note

The black part is the past website traffic data; the blue part is the graphical representation of the forecast.

Terms & Conditions

Author

Félix MIKAELIAN felix.mikaelian@essec.edu :fr:

Dependencies

Copyrights & licenses

Contributing

I would love ideas to make marketeR better, so feel free to contribute to this exciting project :v: !



thesmarthomeninja/marketeR documentation built on May 27, 2019, 1:09 p.m.