неділя, 26 жовтня 2014 р.

Майор Коала собственной персоной

середа, 22 жовтня 2014 р.

RegNow (DR MyCommerce) and GA Universal Analytics ECommerce integration

Задача: видеть прямо в аналитике продажи (транзакции) вашего веб сайта и их источник (компанию, PPC ключевое слово, реферал и т.д.) Данный пример привязан к RegNow (MyCommerce), но его несложно адаптировать под другого провайдера. Если у кого-то есть пример для палки - поделитесь пожалуйста.

Urchin tracking - Тоже самое для urchin аналитики
http://blog.klimenko.kiev.ua/2013/04/regnow-digitalriver-custom-tracking.html



Кусок кода ниже нужно вставить
<script type="text/javascript">
try
{

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');


ga('create', 'UA-XXXXXXX-X', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('require', 'ecommerce', 'ecommerce.js');
ga('linker:autoLink', ['domain.com']);// Domains that are linked from this page.
ga('send', 'pageview'); // Send hits after initializing the auto-linker plug-in.


ga('ecommerce:addTransaction', {
  'id': '<show-var name="orderid"/>', // Transaction ID. Required
  'affiliation': 'RegNow', // Affiliation or store name
  'revenue': '<show-var name="order_total"/>', // Grand Total
  'shipping': '<show-var name="order_shipping"/>', // Shipping
  'tax': '<show-var name="order_tax"/>' // Tax
});

ga('ecommerce:addItem', {
  'id': '<show-var name="orderid"/>', // Transaction ID. Required
  'name': '<show-var name="dynavendor_name"/>', // Product name. Required
  'sku': '<show-var name="dynavendor_item"/>', // SKU/code
  'category': '<show-var name="dynavendor_category"/>', // Category or variation
  'price': '<show-var name="dynavendor_price"/>', // Unit price
  'quantity': '<show-var name="dynavendor_quantity"/>' // Quantity
});

ga('ecommerce:send');

} catch(err) {}

</script>


Базируется на нижеприведенной документации MyCommerce
Based on the following MyCommerce documentation

https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce


Custom Fields of Order Items
This feature allows limited ability to customize the content of the script based on order items' custom fields. The custom fields can be denoted by variables orderitem[field name]_ in the script and can be used in<show-if> and <show-var> tags. For example, a product can have 2 custom fields "AFFL" and "MSG_ID" defined in product configuration file:
<product-configuration>
  <fields>
    <hidden field="affl" display="affl"/>
    <hidden field="msg_id" display="msg_id"/>
    ...
The tracking script can be written to include certain content only when the fields have values:
<script type="text/javascript">
  <show-if var="orderitem_AFFL" condition="notEmpty" test="">var affl='<show-var name="orderitem_AFFL"/>';</show-if>
  <show-if var="orderitem_MSG_ID" condition="notEmpty" test="">var msg_id='<show-var name="orderitem_MSG_ID"/>';</show-if>
</script>
Others
Field Name
Comment
Usage in The Script
Order ID
The order ID.
<show-var name="orderid"/>
Price
The price of a product in the order. Only available when the order contains products from a single vendor (except v1234). This is the unit price of a non-CD (custom CD solution) product from that single vendor in the order. In case multiple eligible products are in the order, an eligible product will be picked at random
<show-var name="dynavendor_price"/>
Product ID
The product ID of a product in the order. Only available when the order contains products from a single vendor (except v1234). This is the unit price of a non-CD (custom CD solution) product from that single vendor in the order. In case multiple eligible products are in the order, an eligible product will be picked at random. The choice of product should match that of the Price field
<show-var name="dynavendor_item"/>
Order Total 
Total Amount Of order 
<show-var name="order_total"/>
Tax
Tax
<show-var name="order_tax"/>
Shipping
Shipping Chargers 
<show-var name="order_shipping"/>
City 
City
<show-var name="order_city"/> 
State 
State
<show-var name="order_state"/>
Country 
Country
<show-var name="order_country"/> 
Product Name 
The product Name of a product in the order. Only available when the order contains products from a single vendor (except v1234).  In case multiple eligible products are in the order, an eligible product will be picked at random. 
<show-var name="dynavendor_name"/> 
Product Category
The product Category of a product in the order. Only available when the order contains products from a single vendor (except v1234). In case multiple eligible products are in the order, an eligible product will be picked at random. 
<show-var name="dynavendor_category"/>
Product Quantity 
The product quantity of a product in the order. Only available when the order contains products from a single vendor (except v1234). In case multiple eligible products are in the order, an eligible product will be picked at random. 
<show-var name="dynavendor_quantity"/> 












Here is how to upgrade your GA ecommerce tracking to universal analytics
https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs




четвер, 9 жовтня 2014 р.

Simple Statistics - terms, definitions and application

Real life implication for everyday marketing described here:
http://www.optimizesmart.com/bare-minimum-statistics-web-analytics/
Mean - math average
Median - middle point of sorted points by ascending. Could be more representative when small number of unusual results
Standard Deviation (S)- how much data differs (summ of squares of differences devided into (n-1) and sq root taken)

On a histogram, if data are distributed bimodal (two peaks) it is a sign that group consists of two groups and needs to be separated. Unimodal - 1 peek on histogram.

IQR - spread of the middle of 50% of data.
Box plots are used to compare two samples of data.

Probabilities

Venn diagrams are graphical way to represent probabilities as event circles that may or may not interlap.
A and B are event. P(A) - probability of the event. - OR ( || or union), - AND ( && ).

Odds in favour of A:
odds = P(A)/(1-P(A)). Odds against (1-P(A))/P(A)

The probability that A or B, or both, occur: P (A ∪ B) = P(A) + P(B) − P(A ∩ B)
If A and B are mutually exclusive - A ∩ B = φ, the empty set or zero.

P(A|B), the conditional probability of A given that B has occurred

P(A ∩ B) = P(A|B)P(B)

A discrete random variable is one that can assume values only on a
A continuous random variable is measured in real units, such as time, weight, temperature or length.

For discrete random variables, a probability is assigned to each individual value that the variable can take.

Normal distribution of probability function (graph drawing)

  1. 68.2% of a normal distribution lies within one standard deviation from the mean.
  2. 95.4% of a normal distribution lies within two standard deviations from the mean.
  3. 99.7% of a normal distribution lies within three standard deviations from the mean.







A statistical hypothesis is a statement about the parameters of the population.

The statement that we are trying to verify is called the null hypothesis. It is denoted by Ho . If the null hypothesis is not supported by the data, then we will adopt the statement contained in the alternative hypothesis. It is denoted by Ha

We use p-values to decide between the null and the alternative hypothesis. The smaller the p- value the more there is evidence in favour of the alternative hypothesis.
The p-value is the probability of obtaining the observed result, or one more extreme, when the null hypothesis is true.

The conclusions corresponding to different p-values
Conclusion
A
p-value < 0.01
Very strong evidence against H0
B
0.01 p-value < 0.05
Strong evidence against H0
C
0.05 p-value < 0.1
Some inconclusive evidence against H0
D
p-value 0.1
Little or no evidence against H0

Regression analysis is a method for investigating the functional relationship among variables.
Based on a regression function, we can predict future values. The difference between actual value and predicted called residual.

субота, 4 жовтня 2014 р.

Образование в школе. Взгляд под необычным углом.

Стали бы вы работать с начальником, который контролирует ваш каждый шаг, без зарплаты, и чтобы при том все результаты вашего труда выкидывали?

Условия такие:
  •  зарплата — ноль, никаких процентов или акций (предполагается, что вы получаете ценный опыт);
  •  минимальный соцпакет: только отпуск и больничные — например, нет страховки;
  •  никакой возможности карьерного роста;
  •  никаких должностных инструкций: просто делайте, что вам скажут;
  •  босс требует отчета о вашем проекте каждый час;
  •  строгий график, начало ровно в 8:30;
  •  если вы опоздаете хотя бы на 5 минут, ваш босс пошлет вас к вышестоящему начальнику;
  •  полная рабочая неделя, но вы также должны много работать из дома;
  •  все столы в одном помещении, никаких отдельных комнат или даже перегородок; жесткие стулья;
  •  работа скучная и унизительная, такая как переписывание текста или сложение цифр;
  •  всю вашу работу выкидывают;
  •  если вы хотите использовать компьютер, вы можете купить свой — или писать на бумаге;
  •  вы сами обеспечиваете себя необходимыми письменными принадлежностями;
  •  моя дочь не может водить машину, поэтому добираться трудно;
  •  вы даже не можете включить эту работу в свое резюме, пока не проработаете там 10 лет.
Вы думаете, это шутка или я придумываю?

Миллионы семилетних приняли подобное предложение и подписали контракт на 11 лет.
© http://blog.shlang.com/post/38977434/would-you-work-with-micromanaging-boss-no-salary-and



В современном мире воспитание, обучение и социализация ребенка – это ответственность родителей. Отдавая ребенка в школу, мы просто устраиваемся, чтобы он нам не мешал. Улучшаем свою жизнь сейчас за счёт его будущей карьеры и счастья.


Еще немного заметок о системе образования:
Дистанционное образование для детей

Миф о лучшем в мире образовании

О таком aспекте наша система образования начиная с младших классов школы и до магистратуры как-то не задумывалась... Вообще. Зато она учит людей "думать"