mixpanel_en/index.md

window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-114798296-1');

ul.nm_ul { list-style: none; /*убираем маркеры списка*/ margin: 0; /*убираем отступы*/ padding-left: 0; /*убираем отступы*/ margin-top:25px; /*делаем отступ сверху*/ background:#DCDCDC; /*добавляем фон всему меню*/ height: 30px; /*задаем высоту*/ } a.nm_a { text-decoration: none; /*убираем подчеркивание текста ссылок*/ background:#696969; /*добавляем фон к пункту меню*/ color:#fff; /*меняем цвет ссылок*/ padding:0px 7px; /*добавляем отступ*/ font-family: arial; /*меняем шрифт*/ line-height:30px; /*ровняем меню по вертикали*/ display: block; border-right: 1px solid #677B27; /*добавляем бордюр справа*/ -moz-transition: all 0.3s 0.01s ease; /*делаем плавный переход*/ -o-transition: all 0.3s 0.01s ease; -webkit-transition: all 0.3s 0.01s ease; } a.nm_a:hover { background:#FF8C00;/*добавляем эффект при наведении*/ } li.nm_li { float:left; /*Размещаем список горизонтально для реализации меню*/ position:relative; /*задаем позицию для позиционирования*/ } /*Стили для скрытого выпадающего меню*/ li.nm_li > ul.nm_ul { position:absolute; top:5px; display:none; } /*Делаем скрытую часть видимой*/ li.nm_li:hover > ul.nm_ul { display:block; width:280px; /*Задаем ширину выпадающего меню*/ } li.nm_li:hover > ul.nm_ul > li.nm_li { float:none; /*Убираем горизонтальное позиционирование*/ }

Menu:

Search:

(function() { var cx = '002735389418227325972:fdikniadyig'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = 'https://cse.google.com/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })();

Выберите язык описания пакета | Chose language of package description

English Русский

Contents of rmixpanel read me.

Description of rmixpanel

rmixpanel is the R client for Mixpanel API, use this tool if you need load data from Mixpanel API into R.

For convenience of searching functions of rmixpanel, each function have prefix "MP.".

You can get detailed help about each of package function by help command, for example if you need help about MP.getRawData function you can run help("MP.getRawData").

In order to get list of all available rmixpanel fuction use help(package = "rmixpanel").

Install rmixpanel

You can instal rmixpanel from GitHub repository, for this run next code in R console.

if(!"rmixpanel" %in% installed.packages()[,1]){install.packages("devtools")}
devtools::install_github("selesnow/rmixpanel")

How get api_secret для работы с API mixpanel

You can be found your api secret by clicking on your name in the upper righthand corner under Project Settings.

API Secret is a require argument of each rmixpanel functions.

  1. Sing in mixpanel using your login and password.
  2. Chose "Accounts" in main menu.
  3. Go to tab "Projects", and copy API Secret of your project.

rmixpanel functions

NameDescription MP.getEventsGet unique, total, or average data for a set of events over N days, weeks, or months. MP.getEventsPropertyGet unique, total, or average data for of a single event and property over days, weeks, or months. MP.getRetentionGet cohort analysis. MP.getRawDataGet a "raw dump" of tracked events over a time period.

MP.getEvents - Get unique, total, or average data for a set of events over N days, weeks, or months.

Arguments

Example

Get total number of event "posting_success","emu","session_start","$custom_event:585946" from 1 june of 2017 till 25 july of 2017, with group by day.

MP_events_day <- MP.getEvents(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                              event = c("posting_success","emu","session_start","$custom_event:585946"),
                              type = "general",
                              unit = "day",
                              from_date = "2017-07-01",
                              to_date = "2017-07-25")

Get average events number of event "session_start" and "$custom_event:585946" in the last two weeks, with group by month.

MP_events_month <- MP.getEvents(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                                event = c("session_start","$custom_event:585946"),
                                interval = 2,
                                type = "average",
                                unit = "month")

MP.getEventsProperty - Get unique, total, or average data for of a single event and property over days, weeks, or months.

Arguments

Example

Get total umber of event "$custom_event:585946" from 1 june of 2017 till 25 july of 2017, with group by day and property mp_country_code.

MP_event_prop <- MP.getEventsProperty(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                                      event = c("$custom_event:585946"),
                                      property = "mp_country_code",
                                      type = "general",
                                      unit = "day",
                                      from_date = "2017-07-01",
                                      to_date = "2017-07-25")

Get total umber of event "$custom_event:585946" in current and previous month, with group by month and property mp_country_code.

MP_event_prop_month <- MP.getEventsProperty(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                                            event = c("$custom_event:585946"),
                                            property = "mp_country_code",
                                            type = "general",
                                            interval = 2,
                                            unit = "month")

MP.getRetention - Get cohort analysis.

Arguments

Example

Get cohort analisys by event "$custom_event:585946" from 1 june of 2017 till 25 july of 2017, with week steps

retension <- MP.getRetention(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                             event = "emu",
                             retention_type = "birth",
                             unit = "week",
                             born_event = "session_start",
                             where = 'properties["utm_source"]=="AdWords" and "Brand" in properties["utm_campaign"]',
                             interval_count = 4,
                             from_date = "2017-08-01",
                             to_date = "2017-09-25")

Get cohort analisys by week, in last four weeks from 1 august of 2017, and segmentation cohort by propery utm_source.

retension_property <- MP.getRetention(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                                      event = "emu",
                                      retention_type = "birth",
                                      unit = "week",
                                      born_event = "session_start",
                                      on = 'properties["utm_source"]',
                                      interval_count = 4,
                                      from_date = "2017-08-01",
                                      to_date = "2017-09-25")

MP.getRawData - Get a "raw dump" of tracked events over a time period..

Work duration of this function is too long and use him only if you can't get data using another functions.

Example usage cases

Arguments

Example

Get all events emu with all his properties from 10 july 2017 года, only by utm_source is AdWords, and campaign name constain "Brand".

MixPanel.RawData <- MP.getRawData(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                                  event = "emu",
                                  where = 'properties["utm_source"]=="AdWords" and "Brand" in properties["utm_campaign"]',
                                  from_date = "2017-07-10",
                                  to_date = "2017-07-10")

Get all events with all properties from 1 september 2017 till 10 september 2017.

MixPanel.RawData <- MP.getRawData(api_secret = "hgf7fi437nhdsad7863y98ryn988h8",
                                  from_date = "2017-09-01",
                                  to_date = "2017-09-10")

Автор пакета: Алексей Селезнёв, Head of Analytics Dept. at Netpeak

Контакты email: selesnow@gmail.com skype: selesnow telegram: @AlexeySeleznev Facebook Vkontakte Linkedin Blog GitHub Stepic



selesnow/rmixpanel documentation built on May 26, 2021, 10:04 a.m.